From 6d9bb3cdbffdf6261447966357eb341b625379d1 Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Sun, 7 Feb 2021 13:16:39 +0100 Subject: [PATCH] Remove hlint hints since they're unused Signed-off-by: Matej Focko --- playbooks/roles/haskell/tasks/main.yml | 5 -- playbooks/roles/haskell/templates/HLint.hs.j2 | 60 ------------------- 2 files changed, 65 deletions(-) delete mode 100644 playbooks/roles/haskell/templates/HLint.hs.j2 diff --git a/playbooks/roles/haskell/tasks/main.yml b/playbooks/roles/haskell/tasks/main.yml index cceb081..e6aaff7 100644 --- a/playbooks/roles/haskell/tasks/main.yml +++ b/playbooks/roles/haskell/tasks/main.yml @@ -8,8 +8,3 @@ template: src: templates/ghci.conf.j2 dest: ~/.ghc/ghci.conf - -- name: Install HLint.hs - template: - src: templates/HLint.hs.j2 - dest: ~/.ghc/HLint.hs diff --git a/playbooks/roles/haskell/templates/HLint.hs.j2 b/playbooks/roles/haskell/templates/HLint.hs.j2 deleted file mode 100644 index 3674e29..0000000 --- a/playbooks/roles/haskell/templates/HLint.hs.j2 +++ /dev/null @@ -1,60 +0,0 @@ -import "hint" HLint.Builtin.All -import "hint" HLint.Default -import "hint" HLint.Dollar - -import Data.Map -import Control.Arrow -import Control.Monad -import Control.Monad.State - -warn = (\ x -> f $ g x) ==> f . g - --- List -warn = cycle [c] ==> repeat c - -warn = x == [] ==> null x where note = "generalize" -warn = [] == x ==> null x where note = "generalize" - -warn = x /= [] ==> not (null x) where note = "generalize" -warn = [] /= x ==> not (null x) where note = "generalize" - -warn = fst (unzip x) ==> map fst x -warn = snd (unzip x) ==> map snd x - -warn "Use not . null" = length x > 0 ==> not (null x) where note = "increases laziness" -warn "Use not . null" = length x >= 1 ==> not (null x) where note = "increases laziness" - --- Map -warn = map fst (Data.Map.toList x) ==> Data.Map.keys x -warn = map snd (Data.Map.toList x) ==> Data.Map.elems x - -warn = foldr f v (Data.Map.elems x) ==> Data.Map.foldr f v x -warn = Data.Maybe.fromMaybe d (Data.Map.lookup k m) ==> Data.Map.findWithDefault d k m - --- Arrows - -warn = id *** id ==> id -warn = Control.Arrow.first id ==> id -warn = Control.Arrow.second id ==> id - -warn = Control.Arrow.first f (Control.Arrow.second g x) ==> (f Control.Arrow.*** g) x -warn = Control.Arrow.second f (Control.Arrow.first g x) ==> (g Control.Arrow.*** f) x - -warn = Control.Arrow.first f (Control.Arrow.first g x) ==> Control.Arrow.first (f . g) x -warn = Control.Arrow.second f (Control.Arrow.second g x) ==> Control.Arrow.second (f . g) x - -warn = (a *** b) ((c &&& d) x) ==> ((a . c) Control.Arrow.&&& (b . d)) x -warn = (a *** b) ((c *** d) x) ==> ((a . c) Control.Arrow.*** (b . d)) x - -warn = Control.Arrow.first f ((a *** b) x) ==> ((f . a) Control.Arrow.*** b) x -warn = Control.Arrow.second f ((a *** b) x) ==> (a Control.Arrow.*** (f . b)) x -warn = (a *** b) (Control.Arrow.first f x) ==> ((a . f) Control.Arrow.*** b) x -warn = (a *** b) (Control.Arrow.second f x) ==> (a Control.Arrow.*** (b . f)) x - -warn = Control.Arrow.first f ((a &&& b) x) ==> ((f . a) Control.Arrow.&&& b) x -warn = Control.Arrow.second f ((a &&& b) x) ==> (a Control.Arrow.&&& (f . b)) x - --- State - -warn = fmap f Control.Monad.State.get ==> Control.Monad.State.gets f -warn = Control.Monad.liftM f Control.Monad.State.get ==> Control.Monad.State.gets f