[Haskell-cafe] Cabal and `main-is` field

Manlio Perillo manlio_perillo at libero.it
Sun Mar 1 12:10:43 EST 2009


Gwern Branwen ha scritto:
> [...]
> 
> You can hoist the common build-depends out of the executable stanzas. 
> ie. from xmonad-utils.cabal:
> 
> build-depends:      base<4, X11>=1.3, ghc>=6.8, unix, random>=1.0
> ...
> executable:         hxsel
> main-is:            Hxsel.hs
> hs-source-dirs:     src
> ghc-options:        -funbox-strict-fields -Wall
> ghc-prof-options:   -prof -auto-all
> 
> executable:         hxput
> main-is:            Hxput.hs
> hs-source-dirs:     src
> ghc-options:        -funbox-strict-fields -Wall
> ghc-prof-options:   -prof -auto-all
> ....
> 
> Notice that though hxput and hxsel need the packages in the top-level 
> build-depends, they don't need to declare it.
> 

Thanks.
 From documentation it was not clear this feature.

However, what happens if hxput add a build-depends field?
Will this override the "global" field?



Manlio Perillo



More information about the Haskell-Cafe mailing list