#5930: add System.Environment.lookupEnv which returns Maybe instead of an
exception
------------------------------+---------------------------------------------
 Reporter:  elaforge          |          Owner:                  
     Type:  feature request   |         Status:  new             
 Priority:  normal            |      Component:  libraries/base  
  Version:  7.4.1             |       Keywords:                  
       Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
  Failure:  None/Unknown      |       Testcase:                  
Blockedby:                    |       Blocking:                  
  Related:                    |  
------------------------------+---------------------------------------------
 getEnv throws an exception when the key isn't found, which is surprising
 and inconvenient.  I'd prefer to change the signature of getEnv to return
 Maybe, but that will break people's code, so I'll settle for a new
 lookupEnv function.

 It's been discussed on [email protected] and there was unanimous
 support.

 Patches attached, the first cleans up mixed tabs and spaces (which I
 understand has been happening in ghc lately).  The second adds the new
 function.  Unfortunately I still can't get ghc to compile so it's untested
 for now. I'll keep trying with GHC, but I don't have a windows machine for
 testing.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5930>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to