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

Effectful.Temporary

Synopsis

Effect

data Temporary :: Effect Source #

An effect for interacting with temporary files.

Instances

Instances details
type DispatchOf Temporary Source # 
Instance details

Defined in Effectful.Temporary

data StaticRep Temporary Source # 
Instance details

Defined in Effectful.Temporary

Handlers

runTemporary :: IOE :> es => Eff (Temporary ': es) a -> Eff es a Source #

Run the Temporary effect.

Operations

withSystemTempFile Source #

Arguments

:: Temporary :> es 
=> String

File name template. See openTempFile.

-> (FilePath -> Handle -> Eff es a)

Callback that can use the file.

-> Eff es a 

withSystemTempDirectory Source #

Arguments

:: Temporary :> es 
=> String

Directory name template. See openTempFile.

-> (FilePath -> Eff es a)

Callback that can use the directory.

-> Eff es a 

withTempFile Source #

Arguments

:: Temporary :> es 
=> FilePath

Temp dir to create the file in.

-> String

File name template. See openTempFile.

-> (FilePath -> Handle -> Eff es a)

Callback that can use the file.

-> Eff es a 

Lifted withTempFile.

withTempDirectory Source #

Arguments

:: Temporary :> es 
=> FilePath

Temp directory to create the directory in.

-> String

Directory name template. See openTempFile.

-> (FilePath -> Eff es a)

Callback that can use the directory.

-> Eff es a