Revision 86aa9ba3
b/Makefile.am | ||
---|---|---|
1594 | 1594 |
if tty -s; then C="-c"; else C=""; fi; \ |
1595 | 1595 |
$(HLINT) --utf8 --report=doc/hs-lint.html --cross $$C \ |
1596 | 1596 |
--ignore "Use first" \ |
1597 |
--ignore "Use comparing" \ |
|
1598 |
--ignore "Use on" \ |
|
1599 |
--ignore "Reduce duplication" \ |
|
1600 | 1597 |
--ignore "Use &&&" \ |
1601 | 1598 |
--ignore "Use void" \ |
1599 |
--ignore "Reduce duplication" \ |
|
1602 | 1600 |
--hint htools/lint-hints \ |
1603 | 1601 |
$(filter-out $(HLINT_EXCLUDES),$(HS_LIBTEST_SRCS) $(HS_PROG_SRCS)) |
1604 | 1602 |
|
b/htools/Ganeti/HTools/Node.hs | ||
---|---|---|
73 | 73 |
, mkNodeGraph |
74 | 74 |
) where |
75 | 75 |
|
76 |
import Data.List hiding (group) |
|
77 |
import qualified Data.Map as Map |
|
76 |
import Control.Monad (liftM, liftM2) |
|
78 | 77 |
import qualified Data.Foldable as Foldable |
79 |
import qualified Data.IntMap as IntMap
|
|
78 |
import Data.Function (on)
|
|
80 | 79 |
import qualified Data.Graph as Graph |
80 |
import qualified Data.IntMap as IntMap |
|
81 |
import Data.List hiding (group) |
|
82 |
import qualified Data.Map as Map |
|
81 | 83 |
import Data.Ord (comparing) |
82 | 84 |
import Text.Printf (printf) |
83 |
import Control.Monad (liftM, liftM2) |
|
84 | 85 |
|
85 | 86 |
import qualified Ganeti.HTools.Container as Container |
86 | 87 |
import qualified Ganeti.HTools.Instance as Instance |
... | ... | |
683 | 684 |
computeGroups :: [Node] -> [(T.Gdx, [Node])] |
684 | 685 |
computeGroups nodes = |
685 | 686 |
let nodes' = sortBy (comparing group) nodes |
686 |
nodes'' = groupBy (\a b -> group a == group b) nodes'
|
|
687 |
nodes'' = groupBy ((==) `on` group) nodes'
|
|
687 | 688 |
in map (\nl -> (group (head nl), nl)) nodes'' |
Also available in: Unified diff