Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Environment :: Effect
- runEnvironment :: (HasCallStack, IOE :> es) => Eff (Environment : es) a -> Eff es a
- getArgs :: Environment :> es => Eff es [String]
- getProgName :: Environment :> es => Eff es String
- getExecutablePath :: Environment :> es => Eff es FilePath
- getEnv :: Environment :> es => String -> Eff es String
- getEnvironment :: Environment :> es => Eff es [(String, String)]
- lookupEnv :: Environment :> es => String -> Eff es (Maybe String)
- setEnv :: Environment :> es => String -> String -> Eff es ()
- unsetEnv :: Environment :> es => String -> Eff es ()
- withArgs :: Environment :> es => [String] -> Eff es a -> Eff es a
- withProgName :: Environment :> es => String -> Eff es a -> Eff es a
Effect
data Environment :: Effect Source #
An effect for querying and modifying the system environment.
Instances
type DispatchOf Environment Source # | |
Defined in Effectful.Environment | |
data StaticRep Environment Source # | |
Defined in Effectful.Environment |
Handlers
runEnvironment :: (HasCallStack, IOE :> es) => Eff (Environment : es) a -> Eff es a Source #
Run the Environment
effect.
Querying the environment
getProgName :: Environment :> es => Eff es String Source #
Lifted getProgName
.
getExecutablePath :: Environment :> es => Eff es FilePath Source #
Lifted getExecutablePath
.
getEnvironment :: Environment :> es => Eff es [(String, String)] Source #
Lifted getEnvironment
.
Modifying the environment
withProgName :: Environment :> es => String -> Eff es a -> Eff es a Source #
Lifted withProgName
.