Skip to content

Commit

Permalink
Merge.hs: cleanup: move comment
Browse files Browse the repository at this point in the history
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
  • Loading branch information
Sergei Trofimovich committed Dec 29, 2013
1 parent b3c980e commit 2b5c12a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Merge.hs
Expand Up @@ -300,13 +300,13 @@ mergeGenericPackageDescription verbosity overlayPath cat pkgGenericDesc fetch =
else liftFlags [u] (simplify $ map (\x -> (x,[])) $ dropFlag u xs')++simplifyMore ls
in (liftFlags fl c) ++ simplifyMore (sd ++ ys)

-- drop selected use flag from a list
getMultiFlags :: [FlagDep] -> [((Cabal.FlagName,Bool),Int)]
getMultiFlags ys = go [] (concatMap fst ys)
where go a [] = a
go a (x:xs) = case lookup x a of
Nothing -> go ((x,1):a) xs
Just n -> go ((x,n+1):filter ((x/=).fst) a) xs
-- drop selected use flag from a list
dropFlag :: (Cabal.FlagName,Bool) -> [FlagDep] -> [FlagDep]
dropFlag f = map (first (filter (f /=)))
hasFlag :: (Cabal.FlagName,Bool) -> FlagDep -> Bool
Expand Down

0 comments on commit 2b5c12a

Please sign in to comment.