How do I specify the source search path?

Jorge Adriano Aires jadrian at mat.uc.pt
Wed Jun 30 11:27:35 EDT 2004


On Wednesday 30 June 2004 16:15, S. Alexander Jacobson wrote:
> I have the working code for my Haskell App Server
> Framework in "~/HAppS/HAppS.hs".  If I want to
> start working on an app that uses this framework
> in e.g. "~/MyApp", how do I tell GHCi to resolve
> "import HAppS"?
>
> Note: The HAppS code is in active development so I
> don't want to put it in the system GHC lib
> hierarchy.  I just want to use it add hoc from the
> command line.

Using the -i flag. Unfortunatly relative paths (using '~') don't seem to work, 
so you have to type the full path: ghci -i/home/user/HAppS/

As far as I know, there is also no way to specify the search path in an 
environment var, so my solution was to add to my .alias:
alias ghci='ghci -i/home/jadrian/Program/Haskell/MyLibs'
alias ghc='ghc -i/home/jadrian/Program/Haskell/MyLibs'

J.A.

J.A.



More information about the Glasgow-haskell-users mailing list