Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
A checked version of System.Environment
Synopsis
- data GetEnvVarError
- getEnvIO :: MonadRunIO m => String -> m String
- getEnv :: MonadRunIOE GetEnvVarError m => String -> m String
- getEnvUIO :: MonadRunIOE e m => String -> m (Either GetEnvVarError String)
- lookupEnvIO :: MonadRunIO m => String -> m (Maybe String)
- lookupEnv :: MonadRunIOE EncodingError m => String -> m (Maybe String)
- lookupEnvUIO :: MonadRunIOE e m => String -> m (Either EncodingError (Maybe String))
getEnv
data GetEnvVarError Source #
Instances
Exception GetEnvVarError Source # | |
Defined in CheckedIO.Environment | |
Show GetEnvVarError Source # | |
Defined in CheckedIO.Environment showsPrec :: Int -> GetEnvVarError -> ShowS # show :: GetEnvVarError -> String # showList :: [GetEnvVarError] -> ShowS # | |
Eq GetEnvVarError Source # | |
Defined in CheckedIO.Environment (==) :: GetEnvVarError -> GetEnvVarError -> Bool # (/=) :: GetEnvVarError -> GetEnvVarError -> Bool # |
getEnv :: MonadRunIOE GetEnvVarError m => String -> m String Source #
getEnvUIO :: MonadRunIOE e m => String -> m (Either GetEnvVarError String) Source #
lookupEnv
lookupEnvIO :: MonadRunIO m => String -> m (Maybe String) Source #
lookupEnv :: MonadRunIOE EncodingError m => String -> m (Maybe String) Source #
Same as lookupEnvUIO
, except throwing the EncodingError
.
lookupEnvUIO :: MonadRunIOE e m => String -> m (Either EncodingError (Maybe String)) Source #
Look up the given environment variable.