Proposal: System.Environment.getEnv should return Maybe

Simon Hengel sol at
Thu Feb 23 10:37:22 CET 2012

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

We already have

    System.Posix.Env.getEnv :: String -> IO (Maybe String)

So for consistency I'd advocate for renaming that to lookupEnv, too.
(keeping getEnv as a deprecated alias, for backward compatibility).

Other than that, +1.


More information about the Libraries mailing list