edwinb/Idris-dev — pull request #489 by gabemc (2013-09-21 11:29:04+00:00)
Title: Issue #331: Modifying the System.getEnv function to return IO (Maybe String) 

This solution may be sub-optimal: it may be the case that only one `isNull` function is necessary, using another `mkForeign` declaration that passes in a `[FString]` instead of an `[FPtr]`.

Test case:

```
module Main

import System

main : IO ()
main = do
getEnv "Nonexistent-var" >>= print
getEnv "PATH" >>= print
return ()
```