environment variables for ghc

Simon Marlow simonmar at microsoft.com
Wed Mar 9 12:19:18 EST 2005

On 09 March 2005 08:29, Frederik Eaton wrote:

> Is it possible to set environment variables which ghc will look at,
> corresponding to command line options such as '-i' or '-package-conf'?
> I.e. the equivalent of gcc's LIBRARY_PATH, CPATH, etc... or perl's
> PERL5LIB or even PERL5OPT (which is the most flexible). These would be
> really convenient since I have a package.conf file in my home
> directory for locally installed packages, and some modules in another
> directory that I often link to.

There's the GHCRTS environment variable that you can use for setting
heap sizes and so on, and the ~/.ghci file, but nothing for setting ghc
command-line arguments.  We're a bit wary of adding more things that we
have to ask for in a bug report...


More information about the Glasgow-haskell-users mailing list