The following instructions are for any Unix like system. Users of MacOS X or flavors of BSD should read the section below.
The procedure should be easy. After you have made sure you meet the requirements, do the following.
Unpack the HsShellScript package somewhere. You get a directory hsshellscript-version which contains the source tree.
Adapt the installation targets at the top of the Makefile. Normally, the files are installted in the following locations.
/usr/local/imports/hsshellscript |
|
The interface files *.hi |
/usr/local/lib |
|
The library |
/usr/local/share/doc/hsshellscript |
|
The documentation |
Type make.
The installation copies the files to the destined locations and registers them with GHC, using the ghc-pkg command. The latter needs root privileges, and installs the package globally visible on the system. As far as GHC's documentation tells, it isn't (yet) possible to register a package for one user only. So you need to become root.
Then type make install.
If you don't have root privileges, then the ghc-pkg command will fail. Then you won't be able to use -package hsshellscript to make HsShellScript accessible. You'd have to tell the compiler the import path (using -i) when compiling, and specify the library (libhsshellscript.a) when linking.
HsShellScript is available on MacOS X through the Darwinports system (similar to the *BSD ports infrastructure). To use HsShellScript, and the other Haskell tools available through Darwinports, you must first install Darwinports. Instructions are at http://darwinports.opendarwin.org.
Once you have installed Darwinports, you can install HsShellScript by
sudo port install hsshellscript
HsShellScript's dependencies will be automatically installed as well, if they are not already on your system. Darwinports will even build GHC from scratch if you don't already have it. This may take several hours, so be patient ;-) If you already have the dependencies installed, an ordinary installation of HsShellScript takes only a few minutes.