4 Using hmatrix

To load hmatrix using GHCI, you need to add the directory containing the gsl shared library to your LD_LIBRARY_PATH:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/local/lib

On Mac OS X 10.4, the LAPACK implementation is contained in the vecLib framework. For interactive use, type

ghci -framework vecLib

To build an example program using GHC, type:

cd examples
ghc --make -framework vecLib plot.hs

5 Plotting with gnuplot and Aquaterm

Install gnuplot using MacPorts:

sudo port install gnuplot

If Aquaterm fails to compile, upgrade to the latest version of XCode. Tell gnuplot what terminal to use:

export GNUTERM=aqua

You should now be able to build and run examples/plot.hs, and see three nicely anti-aliased plots. If you're using an xterm, you can also choose to leave GNUTERM unset to use gnuplot's built-in X11 support, which is uglier, but apparently allows rotation of 3D plots using the mouse.

6 Using fink

With minor changes the instructions work for fink. (I have already had the ghc and ghc-bin packages) In short:

Note that the latest version requires cabal 1.2 and the present fink version of ghc (6.6) has lower version. Nevertheless after installing cabal (which itself requires zlib and filepath) hmatrix installs without problems.