
I’m using Cabal to build a package from some source I’m writing. It is not an executable but rather a library. How can I test locally that the package I’m making is complete? ie How do I reference the package I’ve just buiilt in a haskell source file? Thanks Mike

Your .cabal file will have some exported-modules. Install the library using
`cabal install` and then import these modules to test them.
Take a look here for more: https://www.haskell.org/cabal/users-guide/
On 11 June 2015 at 13:51, Mike Houghton
I’m using Cabal to build a package from some source I’m writing. It is not an executable but rather a library. How can I test locally that the package I’m making is complete? ie How do I reference the package I’ve just buiilt in a haskell source file?
Thanks Mike _______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
-- Regards Sumit Sahrawat

Thank you.
On 11 Jun 2015, at 09:46, Sumit Sahrawat, Maths & Computing, IIT (BHU)
wrote: Your .cabal file will have some exported-modules. Install the library using `cabal install` and then import these modules to test them.
Take a look here for more: https://www.haskell.org/cabal/users-guide/
On 11 June 2015 at 13:51, Mike Houghton
wrote: I’m using Cabal to build a package from some source I’m writing. It is not an executable but rather a library. How can I test locally that the package I’m making is complete? ie How do I reference the package I’ve just buiilt in a haskell source file? Thanks Mike _______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
-- Regards
Sumit Sahrawat _______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners

If your library has any internal modules, make sure to list them in the other-modules section of your cabal file. Every module has to be listed somewhere in the cabal file; otherwise, cabal will not include that module's source file in the tarball that can be built with the "cabal sdist" command. In other words, a more thorough test for package completeness is to run "cabal sdist," take the tarball somewhere else, extract it, and build from that. -Karl On Thu, Jun 11, 2015, at 02:05 AM, Mike Houghton wrote:
Thank you.
On 11 Jun 2015, at 09:46, Sumit Sahrawat, Maths & Computing, IIT (BHU)
wrote: Your .cabal file will have some exported-modules. Install the library using `cabal install` and then import these modules to test them.
Take a look here for more: https://www.haskell.org/cabal/users-guide/
On 11 June 2015 at 13:51, Mike Houghton
wrote: I’m using Cabal to build a package from some source I’m writing. It is not an executable but rather a library. How can I test locally that the package I’m making is complete? ie How do I reference the package I’ve just buiilt in a haskell source file? Thanks Mike _______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
-- Regards
Sumit Sahrawat _______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
participants (3)
-
Karl Voelker
-
Mike Houghton
-
Sumit Sahrawat, Maths & Computing, IIT (BHU)