effectful-0.1: An easy to use, performant extensible effects library.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Effectful.Environment

Synopsis

Effect

data Environment :: Effect Source #

An effect for querying and modifying the system environment.

Instances

Instances details
type DispatchOf Environment Source # 
Instance details

Defined in Effectful.Environment

type DispatchOf Environment = 'Static 'WithSideEffects
data StaticRep Environment Source # 
Instance details

Defined in Effectful.Environment

data StaticRep Environment = Environment

Handlers

runEnvironment :: IOE :> es => Eff (Environment ': es) a -> Eff es a Source #

Run the Environment effect.

Querying the environment

getArgs :: Environment :> es => Eff es [String] Source #

Lifted getArgs.

getProgName :: Environment :> es => Eff es String Source #

Lifted getProgName.

getEnv :: Environment :> es => String -> Eff es String Source #

Lifted getEnv.

lookupEnv :: Environment :> es => String -> Eff es (Maybe String) Source #

Lifted lookupEnv.

Modifying the environment

setEnv :: Environment :> es => String -> String -> Eff es () Source #

Lifted setEnv.

unsetEnv :: Environment :> es => String -> Eff es () Source #

Lifted unsetEnv.

withArgs :: Environment :> es => [String] -> Eff es a -> Eff es a Source #

Lifted withArgs.

withProgName :: Environment :> es => String -> Eff es a -> Eff es a Source #

Lifted withProgName.