3.4. Adding packages to a Hugs installation

The recommended way to add Haskell libraries and programs to a Hugs installation (or any other Haskell implementation) is to use the Cabal packaging system. The necessary support library is included in the Hugs installation. For Hugs, a Cabal package will be installed in the following places, where prefix is the directory prefix given to the Cabal setup script:

prefix/lib/hugs/packages/package

A directory containing the module hierarchy for the package, with associated binary shared objects (if required). To enable Hugs to find these modules, you will need to ensure that the Hugs search path (see -Pstr) includes "prefix/lib/hugs/packages/*" (with a literal "*").

You can remove the package by simply deleting this directory.

prefix/lib/hugs/programs/program

A directory containing the modules of an executable Haskell program, with associated binary shared objects (if required).

prefix/bin/program

An executable shell script that invokes runhugs (see Section 4.1) on the Main module of an executable Haskell program from the above directory. This program will be runnable if your program search path includes the directory "prefix/bin".

The default setting of the module search path (see -Pstr) supports the following uses:

Note: Cabal should work with Hugs on Windows for simple packages. More complex ones require a Unix-like environment such as MSYS/MinGW. Also there is as yet no package manipulation tool hugs-pkg.