Browse files

Fix subtile bug with missing features

        if c then bar else foobar
     ++ other expression
looks like
        (if c then bar else foobar) ++ other expression
but in haskell it's really parsed as
        if c then bar else (foobar ++ other expression)
which we did not want.
This patch writes the parentesis explicitly and fixes the bug.
  • Loading branch information...
1 parent a4d7c12 commit 4c4b6765eb6cbee8e447c2cde66bb76612adaded @kolmodin kolmodin committed May 10, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 Cabal2Ebuild.hs
@@ -98,7 +98,7 @@ cabal2ebuild pkg = ebuildTemplate {
++ convertDependencies (Cabal.buildDepends pkg),
my_pn = if any isUpper cabalPkgName then Just cabalPkgName else Nothing,
features = features ebuildTemplate
- ++ if null (Cabal.executables pkg) then [] else ["bin"]
+ ++ (if null (Cabal.executables pkg) then [] else ["bin"])
++ maybe [] (const ["lib","profile","haddock"]) (Cabal.library pkg)
} where
cabalPkgName = Cabal.pkgName (Cabal.package pkg)

0 comments on commit 4c4b676

Please sign in to comment.