
9 Oct
2009
9 Oct
'09
1:07 p.m.
On Fri, 2009-10-09 at 17:37 +0200, Sönke Hahn wrote:
Hi!
I need to set an environment variable from Haskell and i would like to do that cross-platform. There is System.Posix.Env.setEnv, which does exactly, what i want on Linux. There is the module System.Environment, which seems to be cross-platform, but it does not contain functions to manipulate the environment (, just to inspect it). At first glance, I didn't find anything relevant in the sub-modules of System.Win32.
Note that often it is enough to set environment variables for the programs that you invoke, rather than for your own process. If that's enough then you can do it via the System.Process.createProcess action. Duncan