Proposal: System.Environment.getEnv should return Maybe

Brandon Allbery allbery.b at
Thu Feb 23 00:09:58 CET 2012

On Wed, Feb 22, 2012 at 18:05, Evan Laforge <qdunkan at> wrote:

> So I propose a function: lookupEnv :: String -> IO (Maybe String)

Maybe if exceptions fit the ecosystem a bit better, but as is getEnv does
not make enormous amounts of sense to me (it's a bit like assuming the
behavior of the C version on a nonexistent variable should be a core dump;
that's taking the nature of unchecked pointers just a bit too literally...).

brandon s allbery                                      allbery.b at
wandering unix systems administrator (available)     (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list