[Haskell-cafe] How to add ENV variable in runhaskell shell script

Steve Lihn stevelihn at gmail.com
Sun Jan 13 22:44:01 EST 2008


Hi,
In perl scripts (unix), one can do
==
#!/usr/local/bin/perl
BEGIN {
  $ENV{LD_LIBRARY_PATH} = ...;
}
  do my perl stuff
==
The setting of ENV variable before the program runs allows me to fix
the shell environments. In this case, I need to specify where to look
for the shared library.

How do I do this in Haskell if I am writing the same script using:
==
#!/path/to/runhaskell
  {-
     how to set LD_LIBRARY_PATH = ... ?
  -}

  do my haskell stuff
==

Thanks,
Steve


More information about the Haskell-Cafe mailing list