Proposal: Add setEnv/unsetEnv to "base"
sol at typeful.net
Fri Oct 5 10:19:51 CEST 2012
On Wed, Oct 03, 2012 at 12:49:19PM -0700, Evan Laforge wrote:
> On Wed, Oct 3, 2012 at 12:10 PM, Simon Hengel <sol at typeful.net> wrote:
> > 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.
> I notice setEnv documents this, but maybe you could add a line to
> document why? Readers are likely to be thinking "that's a dumb
> design", at least you can deflect the blame over to windows.
I gave it a try on my "blame-windows" branch . It's more text now,
so the important thing (== how does setEnv behave) may be easier to
miss. Not sure, opinions?
For comparison, the previous version is at .
More information about the Libraries