2016-06-06 23:16:17 +03:00
|
|
|
import "hint" HLint.Default
|
|
|
|
import "hint" HLint.Dollar
|
|
|
|
import "hint" HLint.Generalise
|
2016-06-06 23:12:23 +03:00
|
|
|
|
2016-06-24 00:47:01 +03:00
|
|
|
ignore "Use mappend"
|
2017-06-21 22:49:12 +03:00
|
|
|
ignore "Redundant do"
|
2018-03-20 17:41:53 +03:00
|
|
|
-- TODO: investigate whether cost-center analysis is better with lambda-case than it was
|
|
|
|
ignore "Use lambda-case"
|
|
|
|
|
2016-06-24 00:47:01 +03:00
|
|
|
error "generalize ++" = (++) ==> (<>)
|
2016-05-26 19:58:59 +03:00
|
|
|
-- 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"
|
2016-05-26 21:53:12 +03:00
|
|
|
|
2018-05-30 17:36:16 +03:00
|
|
|
error "use termAnnotation" = termFAnnotation . unTerm ==> termAnnotation
|
|
|
|
error "use termOut" = termFOut . unTerm ==> termOut
|
2017-08-03 19:04:17 +03:00
|
|
|
|
|
|
|
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"
|
2018-05-30 17:37:16 +03:00
|
|
|
|
|
|
|
error "use maybeM" = maybe a pure ==> maybeM a
|
2018-06-19 15:36:00 +03:00
|
|
|
|
|
|
|
error "avoid redundant pure" = f <$> pure a <*> b ==> f a <$> b
|
|
|
|
error "avoid redundant pure" = f <$> pure a <* b ==> f a <$ b
|