Testing a local package with Cabal?

Brent Yorgey byorgey at seas.upenn.edu
Fri Feb 25 20:11:38 CET 2011

On Fri, Feb 25, 2011 at 07:53:42AM -0800, Howard B. Golden wrote:
> Hi,
> I am making my first package to be installed with Cabal from Hackage. I know how 
> to run the various steps (configure, build, install, etc.) using runhaskell 
> Setup.hs.

By the way, it is no longer recommended to do runhaskell Setup.hs
directly---instead, use cabal install (or cabal configure, cabal
build, etc.) which will call Setup.hs indirectly.

> Is there some way I can package my package as a tar.gz (using sdist) and then 
> test it from a local file as if it were being downloaded from Hackage by cabal 
> install? (If this is documented, I couldn't find it. If this isn't documented, 
> it should be IMO. If this isn't currently available, I request the feature be 
> added.)

You may be interested in something like




> Also, do I have to do something special in the .cabal file (or elsewhere) to get 
> Haddock run on the source files?

You can pass the --enable-documentation flag to cabal install; or you
can run 'cabal haddock' to build the documentation separately after


More information about the Libraries mailing list