Commit 86aa9ba3 authored by Iustin Pop's avatar Iustin Pop
Browse files

Remove two hlint overrides



"Use comparing" was not needed, and "Use on" can be solved by actually
using on in the single case we have (the patch also reorders imports
in that file).
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 570274e4
......@@ -1594,11 +1594,9 @@ hlint: $(HS_BUILT_SRCS) htools/lint-hints.hs
if tty -s; then C="-c"; else C=""; fi; \
$(HLINT) --utf8 --report=doc/hs-lint.html --cross $$C \
--ignore "Use first" \
--ignore "Use comparing" \
--ignore "Use on" \
--ignore "Reduce duplication" \
--ignore "Use &&&" \
--ignore "Use void" \
--ignore "Reduce duplication" \
--hint htools/lint-hints \
$(filter-out $(HLINT_EXCLUDES),$(HS_LIBTEST_SRCS) $(HS_PROG_SRCS))
......
......@@ -73,14 +73,15 @@ module Ganeti.HTools.Node
, mkNodeGraph
) where
import Data.List hiding (group)
import qualified Data.Map as Map
import Control.Monad (liftM, liftM2)
import qualified Data.Foldable as Foldable
import qualified Data.IntMap as IntMap
import Data.Function (on)
import qualified Data.Graph as Graph
import qualified Data.IntMap as IntMap
import Data.List hiding (group)
import qualified Data.Map as Map
import Data.Ord (comparing)
import Text.Printf (printf)
import Control.Monad (liftM, liftM2)
import qualified Ganeti.HTools.Container as Container
import qualified Ganeti.HTools.Instance as Instance
......@@ -683,5 +684,5 @@ defaultFields =
computeGroups :: [Node] -> [(T.Gdx, [Node])]
computeGroups nodes =
let nodes' = sortBy (comparing group) nodes
nodes'' = groupBy (\a b -> group a == group b) nodes'
nodes'' = groupBy ((==) `on` group) nodes'
in map (\nl -> (group (head nl), nl)) nodes''
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment