Mmm, that seems like a shortcoming.<br><br>Well, you could just wrap the C functions yourself, like this (two possibilities, no error checking yet, quick hack):<div><a href="http://hpaste.org/fastcgi/hpaste.fcgi/view?id=10565#a10565">http://hpaste.org/fastcgi/hpaste.fcgi/view?id=10565#a10565</a></div>
<div><br></div><div>Note that using SetEnvironmentVariable does not seem to be compatible with getEnv, but calling _putenv does work.</div><div><br></div><div>So I guess someone should add this setEnv wrapper to the System.Environment module? Ticket?</div>
<div><br></div><div><br>On Fri, Oct 9, 2009 at 5:37 PM, Sönke Hahn &lt;<a href="mailto:shahn@cs.tu-berlin.de">shahn@cs.tu-berlin.de</a>&gt; wrote:<br>&gt; Hi!<br>&gt;<br>&gt; I need to set an environment variable from Haskell and i would like to do that<br>
&gt; cross-platform. There is System.Posix.Env.setEnv, which does exactly, what i<br>&gt; want on Linux. There is the module System.Environment, which seems to be<br>&gt; cross-platform, but it does not contain functions to manipulate the<br>
&gt; environment (, just to inspect it). At first glance, I didn&#39;t find anything<br>&gt; relevant in the sub-modules of System.Win32.<br>&gt;<br>&gt; Is this just not implemented? How could i implement it myself?<br>&gt;<br>
&gt; Grateful for any comment,<br>&gt;<br>&gt; Sönke<br>&gt; _______________________________________________<br>&gt; Haskell-Cafe mailing list<br>&gt; <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
&gt; <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>&gt;<br><br></div>