Proposal: Add setEnv/unsetEnv to "base"
Simon Hengel
sol at typeful.net
Wed Oct 3 21:10:05 CEST 2012
On Wed, Oct 03, 2012 at 08:27:21PM +0200, Gregory Collins wrote:
> +1 (a no-brainer, in my opinion) --- although you can get rid of
> unsetEnv if you make setEnv take a "Maybe String", which might be
> better.
I haven't pointed that out, because it's documented in the Haddock
comments, but on Windows, setEnv "FOO" "" will remove FOO from the
environment. I don't particularly like it, but as my stated goal was to
provide the exact same behavior on all platforms and there is no way to
work around this on Windows my implementation does the same thing.
People who don't care for Windows support and want to set an environment
variable to the empty string can still use "unix".
So short answer: setEnv already supports removing.
We could still remove unsetEnv from the public interface. I have no
fixed opinion on that, so I'm very open for suggestions.
Cheers,
Simon
More information about the Libraries
mailing list