environment variables for ghc

Frederik Eaton frederik at ugcs.caltech.edu
Wed Mar 9 13:01:40 EST 2005

On Wed, Mar 09, 2005 at 05:19:18PM -0000, Simon Marlow wrote:
> 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...

Oh, is that the only reason? That's a terrible reason to not have a
feature. :) You could just write a 'ghcbug' script which includes all
information automatically. See the output of 'perlbug -d' for example.

I guess I could write a wrapper to add the options myself ... but is
everybody supposed to do this who has a package.conf in their home
directory, or some common set of utility modules somewhere? It seems
like a fairly common use case that should be well-supported in a
standard way out of the box.



More information about the Glasgow-haskell-users mailing list