-
Notifications
You must be signed in to change notification settings - Fork 722
Open
Labels
Description
I used the following test program
import Distribution.PackageDescription.Parse ( readPackageDescription )
import Distribution.PackageDescription.PrettyPrint ( writeGenericPackageDescription )
import Distribution.Verbosity
test :: FilePath -> IO ()
test cabalFile = readPackageDescription deafening cabalFile >>= writeGenericPackageDescription (cabalFile++"-new")
to read, parse, and write the Cabal file of arithmoi, and I found that the output has a duplicated build-depends
stanza I don't understand. The original file (cut down to the relevant part) says:
library
build-depends : base >= 4 && < 5, array >= 0.3 && < 0.6, ghc-prim,
integer-gmp < 1, containers >= 0.3 && < 0.6, random >= 1.0 && < 1.1,
mtl >= 2.0 && < 2.3
exposed-modules : ...
extensions : BangPatterns
ghc-options : -O2 -Wall
if flag(llvm)
ghc-options : -fllvm
ghc-prof-options : -O2 -auto
The re-generated expression, however, says:
library
build-depends:
base >=4 && <5,
array >=0.3 && <0.6,
ghc-prim -any,
integer-gmp <1,
containers >=0.3 && <0.6,
random >=1.0 && <1.1,
mtl >=2.0 && <2.3
if flag(llvm)
ghc-options: -fllvm
exposed-modules:
...
build-depends:
base >=4 && <5,
array >=0.3 && <0.6,
ghc-prim -any,
integer-gmp <1,
containers >=0.3 && <0.6,
random >=1.0 && <1.1,
mtl >=2.0 && <2.3
extensions: BangPatterns
other-modules:
...
Why is that dependency information duplicated in the generated output?