Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- get_env_with_default :: String -> String -> IO String
- get_env_default :: String -> String -> IO String
- lookup_env_default :: String -> String -> IO String
Documentation
get_env_with_default :: String -> String -> IO String Source #
getEnv
with error handler to return default value. This almost works in hugs (IOException should be Exception, the signature can be elided)
get_env_with_default "undefined_environment_variable" "default" -- > "default"
get_env_default :: String -> String -> IO String Source #
getEnvironment
with lookup and default value.
get_env_default "PATH" "/usr/bin"