== Background == Searchpath looks at the import statements in the haskell source files identified on the command line. It uses module maps to resolve imported module names to module locations. Modules hierarchies may be: * unpacked at some base URL * packed in a tgz file located at some URL * in local file hierarchy * in a darcs/svn/cvs etc repo perhaps with a particular tag Local module hierarchies in the file system and module maps are passed via the command line. The first module found by searching through the sequence is the one that gets used to build the program. == Typical Usage == sp ghc --make -o myProgram -i src src/Main.hs Module chase in src directory and using the default module map to build myProgram sp ghc --make -o myProgram -i src -i /path/to/mymodule.map src/Main.hs Module chase in src directory and using mymodule.map and the default module map to build myProgram. You can also use a url instead of a path to designate the location of a modue map. You can pass as many -i options as you want. sp ghc --make -i src src/Main.hs --run arg1 arg2 Does same as above. But it also runs the program, recompiling and restarting on changes to source. Really useful for server apps! Note that you don't need to pass a -o if you pass a --run. == Full Usage Information == sp [options and input files] Options: --cache-dir somedir Store the source files in a directory other than ~user/.searchpath --maxAge 600 Set the max age of files at 10 minutes rather than the two week default. -i Add the mapfile at the URL to the set of -idirectories. -i Add the local map file to the set of -idirectories -i Find modules based in that directory. -no-exts Don't add a bunch of standard extensions for ghc users. --no-default-map don't use the default map located at http://searchpath.org/default.map --run ... run executable specified by -o if present and auto-recompile on source changes. must be last flag because remaining args are just passed to the resulting executable You can also add all the normal options for your compiler/interpreter (except -i without any argument for ghc users). Source files on the command line must have a .hs or .lhs extension. == Non-local Source Files on the Command Line == If the source file on the command line is not a local file, Searchpath will take care of downloading that as well. Use this feature with the runhaskell or the --run argument to run stuff straight off the internet. == Module Maps == To understand the module map format, look at the comments in the default module map located at . == Improvement == More info is at http//searchpath.org. The darcs repo may be retrieved via: darcs get http://searchpath.org/searchpath