Proposal: System.Environment.getEnv should return Maybe

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


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

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

+1
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 gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20120222/dee2aedf/attachment.htm>


More information about the Libraries mailing list