@@ -198,29 +198,125 @@ Example of lines:
198
198
199
199
(ert-deftest haskell-indentation-check-17a ()
200
200
" A type for a function"
201
+ :expected-result :failed
201
202
(haskell-indentation-check
202
203
" fun :: Int"
203
204
" -> Int"
204
205
" ^" ))
205
206
206
207
(ert-deftest haskell-indentation-check-17b ()
207
208
" A type for a function with context"
209
+ :expected-result :failed
208
210
(haskell-indentation-check
209
211
" fun :: Monad m"
210
212
" => Int"
211
213
" ^" ))
212
214
213
215
(ert-deftest haskell-indentation-check-17c ()
214
216
" A type for a function with complicated context"
217
+ :expected-result :failed
215
218
(haskell-indentation-check
216
219
" fun :: (Monad m, MonadBaseControl IO m, MyMonad (A v) m)"
217
220
" => MyMonad (A v) m"
218
221
" ^" ))
219
222
220
223
(ert-deftest haskell-indentation-check-17d ()
221
224
" A type for a function with param and a complicated context"
225
+ :expected-result :failed
222
226
(haskell-indentation-check
223
227
" fun :: (Monad m, MonadBaseControl IO m, MyMonad (A v) m)"
224
228
" => MyMonad (A v) m"
225
229
" -> m (Maybe a)"
226
230
" ^" ))
231
+
232
+ (ert-deftest haskell-indentation-check-18a ()
233
+ " if then else indentation: then"
234
+ (haskell-indentation-check
235
+ " x = if flag"
236
+ " then 1"
237
+ " ^" ))
238
+
239
+ (ert-deftest haskell-indentation-check-18b ()
240
+ " if then else indentation: else"
241
+ (haskell-indentation-check
242
+ " x = if flag"
243
+ " then 1"
244
+ " else 0"
245
+ " ^" ))
246
+
247
+ (ert-deftest haskell-indentation-check-18c ()
248
+ " do and if then else indentation: then"
249
+ (haskell-indentation-check
250
+ " x = do"
251
+ " if flag"
252
+ " then 1"
253
+ " ^" ))
254
+
255
+ (ert-deftest haskell-indentation-check-18d ()
256
+ " do and if then else indentation: else"
257
+ (haskell-indentation-check
258
+ " x = do"
259
+ " if flag"
260
+ " then 1"
261
+ " else 0"
262
+ " ^" ))
263
+
264
+ (ert-deftest haskell-indentation-check-18e ()
265
+ " do and if then else indentation: else"
266
+ :expected-result :failed
267
+ (haskell-indentation-check
268
+ " x = do"
269
+ " if flag"
270
+ " then do"
271
+ " return ()"
272
+ " ^" ))
273
+
274
+ (ert-deftest haskell-indentation-check-18f ()
275
+ " do and if then else indentation: else"
276
+ :expected-result :failed
277
+ (haskell-indentation-check
278
+ " x = do"
279
+ " if flag"
280
+ " then do"
281
+ " return ()"
282
+ " else do"
283
+ " return ()"
284
+ " ^" ))
285
+
286
+ (ert-deftest haskell-indentation-check-19a ()
287
+ " let and in"
288
+ (haskell-indentation-check
289
+ " x = let"
290
+ " y"
291
+ " ^" ))
292
+
293
+ (ert-deftest haskell-indentation-check-19b ()
294
+ " let and in"
295
+ (haskell-indentation-check
296
+ " x = let y"
297
+ " in "
298
+ " z "
299
+ " ^" ))
300
+
301
+ (ert-deftest haskell-indentation-check-19c ()
302
+ " let in a do"
303
+ (haskell-indentation-check
304
+ " x = do"
305
+ " thing"
306
+ " let "
307
+ " z = 5"
308
+ " ^" ))
309
+
310
+ (ert-deftest haskell-indentation-check-instance-20a ()
311
+ " instance declaration"
312
+ (haskell-indentation-check
313
+ " instance C a where"
314
+ " c = undefined"
315
+ " ^" ))
316
+
317
+ (ert-deftest haskell-indentation-check-instance-20b ()
318
+ " instance declaration"
319
+ (haskell-indentation-check
320
+ " instance (Monad m) => C m a where"
321
+ " c = undefined"
322
+ " ^" ))
0 commit comments