[Haskell] ANN: SearchPath 0.5 and Request for https module URLs

S. Alexander Jacobson alex at alexjacobson.com
Mon May 16 20:18:45 EDT 2005

At Simon Marlow's suggestion, I have implemented Internet import 

You wrap your compiler/interpreter call with "searchpath", pass the 
correct parameters and it will find all your module imports, if they 
are not local, it will look them up in Internet module directories you 
specify, retrieve the relevant modules, put them on your path and then 
run your compiler/interpeter with the appropriate commandline 
options. e.g.

  searchpath ghc MyModule.hs OtherModule -isomeDir --internet localModules.map -iotherdir --internet https://hackage.org/modules.map -iotherDir2 -cache cache

will result in the download of all the modules it can find each directory and execute:

  ghc MyModule.hs OtherModule -isomeDir --icache/internet1 -iotherdir -icache/internet2 -iotherDir2

Mapfiles have the form:

   HAppS  http://happs.org #comment
   *.*.HaXml.*  http://www.cs.york.ac.uk/fp/darcs/HaXml/src #another comment

Simon, I am now handling import chasing, Haskell extensions, literate 
haskell, latex haskell, and HTTPS URLs (via curl).

It works with the ghc command line, except that it doesn't handle 
multiple directories passed on the same -i.  (Can someone tell me what 
the official path separator is for ghc -i?).

It doesn't yet work with other compilers/interpreters, but should be 
easy to adapt.

It does not handle package files right now.

Request: This will work better as people expose their modules via 
http(s).  If your modules are visible this way, please email me a 

Location: http://happs.org/SearchPath.hs


S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com

More information about the Haskell mailing list