How do I specify the source search path?

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. -Alex- _________________________________________________________________ S. Alexander Jacobson mailto:me@alexjacobson.com tel:917-770-6565 http://alexjacobson.com

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.

Jorge Adriano Aires wrote:
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/
right '~' is not expanded, but '-i../HApps:.' should work
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'
you can put :set -i/home/user/HAppS:... in your ~/.ghci file Christian

On Wed, Jun 30, 2004 at 04:27:35PM +0100, Jorge Adriano Aires wrote:
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/
Thats because GHCi insists that there be no space between -i and the path, and shell tilde expansion won't work it such situation. -i$HOME/HAppS/ should work. Hint: you can put this in your .ghci :set -i/full/path/to/homedir/HAppS/ Best regards, Tom -- .signature: Too many levels of symbolic links
participants (4)
-
Christian Maeder
-
Jorge Adriano Aires
-
S. Alexander Jacobson
-
Tomasz Zielonka