-
Notifications
You must be signed in to change notification settings - Fork 0
/
HLint.hs
33 lines (26 loc) · 1004 Bytes
/
HLint.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import "hint" HLint.Default
import "hint" HLint.Dollar
import "hint" HLint.Generalise
ignore "Use mappend"
ignore "Redundant do"
error "generalize ++" = (++) ==> (<>)
-- AMP fallout
error "generalize mapM" = mapM ==> traverse
error "generalize mapM_" = mapM_ ==> traverse_
error "generalize forM" = forM ==> for
error "generalize forM_" = forM_ ==> for_
error "Avoid return" =
return ==> pure
where note = "return is obsolete as of GHC 7.10"
error "use pure" = free . Pure ==> pure
error "use wrap" = free . Free ==> wrap
error "use extract" = termAnnotation . unTerm ==> extract
error "use unwrap" = termOut . unTerm ==> unwrap
error "avoid head" = head
where note = "head is partial; consider using Data.Maybe.listToMaybe"
error "avoid tail" = tail
where note = "tail is partial; consider pattern-matching"
error "avoid init" = init
where note = "init is partial; consider pattern-matching"
error "avoid last" = last
where note = "last is partial; consider pattern-matching"