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 -P
str
) includes
“
”
(with a literal “prefix
/lib/hugs/packages/**
”).
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 -P
str
) supports the following uses:
To prepare to install a package privately, invoke the Cabal setup script with
setup configure --prefix=$HOME
To prepare to install a package for use by all users of the local host,
invoke the Cabal setup script without a --prefix
option.
The package will then be installed under
/usr/local/lib/hugs/packages
(assuming you have the necessary permissions).
Those preparing binary packages will use --prefix=/usr
or similar, with an appropriate --destdir
option to “setup copy
”.
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.