Additional libraries with GHCi

Graham Klyne gk@ninebynine.org
Thu, 08 May 2003 18:51:44 +0100


This message started as a question, but having found a solution I'm 
offering it as a suggestion for the GHC documentation...

I'm trying to run my code developed under HUGS to GHCi (5.04.3), where the 
host OS is Win2K.

I've tried -L<path> command line option, :Set -L<path>, and creating an 
environment variable LD_LIBRARY_PATH, but GHCi still fails to import 
modules from the indicated directory.  My error message is:

   Can't find module 'HUnit' (while processing GraphTest.h)

...

I finally stumbled across the fact that source files are picked up using 
the '-i' command line option.  Further, I note that files are not located 
if a trailing '/' or '\' is included on the directory name.

My suggestion, therefore, is to add a note to section 3.5.2 of the GHC user 
guide ("Extra Libraries" in the section on GHCi), along the lines of:

[[
Additional libraries provided as Haskell Source files (.hs, .lhs) may be 
located by using the "-i" command line option.  The directory name must be 
specified without a trailing "/" (or "\") character.
]]

Is there an environment variable I can use with GHCi on Windows to achieve 
a similar effect?

#g


-------------------
Graham Klyne
<GK@NineByNine.org>
PGP: 0FAA 69FF C083 000B A2E9  A131 01B9 1C7A DBCA CB5E