[Haskell-cafe] Stupid question about Cabal file

Daniel Fischer daniel.is.fischer at web.de
Thu Jun 26 09:12:06 EDT 2008


Am Donnerstag, 26. Juni 2008 14:56 schrieb Fernand:
> Daniel Fischer пишет:
> > Did you create your package using Cabal, i.e. have a module Setup.(l)hs
> > in the same directory as the .cabal file and then
> >
> > runhaskell Setup.hs configure --prefix=WhereYouWantIt
> > runhaskell Setup.hs build
> > runhaskell Setup.hs haddock (optionally)
> > runhaskell Setup.hs install
> > ?
> >
> > Then you shouldn't even need the -package option to use it, ghc-pkg would
> > know where to find the interface files.
> >
> > Cheers,
> > Daniel
>
> No, I did not, because I actually inherited a large Makefile with huge
> dependencies and twisted built options.
> If using Setup is the right (and only) way to create the package, I will
> then try it.
>
> thank you,
>
> Fernand

If it's a complicated build, you should certainly take a close look at the 
Cabal user guide, because then you will probably need more than 
main = defaultMain
in your Setup.hs. On the other hand, the GHC user's guide should also contain 
some sections on building and registering packages.

The Cabal / Setup way is intended to be the simplest and standard way to build 
packages, but it's not the only one and won't be for a long time.

Cheers,
Daniel



More information about the Haskell-Cafe mailing list