Safe Haskell | None |
---|---|
Language | GHC2021 |
Effects.System.Environment
Contents
Description
Provides the MonadEnv
typeclass.
Since: 0.1
Synopsis
- class Monad m => MonadEnv (m :: Type -> Type) where
- getArgs :: m [String]
- getProgName :: m String
- executablePath :: Maybe (m (Maybe FilePath))
- getExecutablePath :: m FilePath
- getEnv :: String -> m String
- lookupEnv :: String -> m (Maybe String)
- setEnv :: String -> String -> m ()
- unsetEnv :: String -> m ()
- withArgs :: HasCallStack => [String] -> m a -> m a
- withProgName :: HasCallStack => String -> m a -> m a
- getEnvironment :: m [(String, String)]
Effect
class Monad m => MonadEnv (m :: Type -> Type) where Source #
Environment effects.
Since: 0.1
Methods
getArgs :: m [String] Source #
Lifted getArgs
.
Since: 0.1
getProgName :: m String Source #
Lifted getProgName
.
Since: 0.1
executablePath :: Maybe (m (Maybe FilePath)) Source #
Lifted executablePath
.
Since: 0.1
getExecutablePath :: m FilePath Source #
Lifted getExecutablePath
.
Since: 0.1
getEnv :: String -> m String Source #
Lifted getEnv
.
@since 0.1
lookupEnv :: String -> m (Maybe String) Source #
Lifted lookupEnv
.
Since: 0.1
setEnv :: String -> String -> m () Source #
Lifted setEnv
.
Since: 0.1
unsetEnv :: String -> m () Source #
Lifted unsetEnv
.
Since: 0.1
withArgs :: HasCallStack => [String] -> m a -> m a Source #
Lifted withArgs
.
Since: 0.1
withProgName :: HasCallStack => String -> m a -> m a Source #
Lifted withProgName
.
Since: 0.1
getEnvironment :: m [(String, String)] Source #
Lifted getEnvironment
.
Since: 0.1