Testing a local package with Cabal?

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. 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.) Also, do I have to do something special in the .cabal file (or elsewhere) to get Haddock run on the source files? Thanks. Cheers, Howard B. Golden Northridge, California, USA

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 http://hackage.haskell.org/package/cabal-dev or http://hackage.haskell.org/package/capri
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 installing. -Brent
participants (2)
-
Brent Yorgey
-
Howard B. Golden