| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Effectful.Temporary
Contents
Synopsis
- data Temporary (a :: Type -> Type) b
- runTemporary :: forall (es :: [Effect]) a. (HasCallStack, IOE :> es) => Eff (Temporary ': es) a -> Eff es a
- withSystemTempFile :: forall (es :: [Effect]) a. Temporary :> es => String -> (FilePath -> Handle -> Eff es a) -> Eff es a
- withSystemTempDirectory :: forall (es :: [Effect]) a. Temporary :> es => String -> (FilePath -> Eff es a) -> Eff es a
- withTempFile :: forall (es :: [Effect]) a. Temporary :> es => FilePath -> String -> (FilePath -> Handle -> Eff es a) -> Eff es a
- withTempDirectory :: forall (es :: [Effect]) a. Temporary :> es => FilePath -> String -> (FilePath -> Eff es a) -> Eff es a
Effect
data Temporary (a :: Type -> Type) b Source #
An effect for interacting with temporary files.
Instances
| type DispatchOf Temporary Source # | |
Defined in Effectful.Temporary | |
| data StaticRep Temporary Source # | |
Defined in Effectful.Temporary | |
Handlers
runTemporary :: forall (es :: [Effect]) a. (HasCallStack, IOE :> es) => Eff (Temporary ': es) a -> Eff es a Source #
Run the Temporary effect.
Operations
Arguments
| :: forall (es :: [Effect]) a. Temporary :> es | |
| => String | File name template. See |
| -> (FilePath -> Handle -> Eff es a) | Callback that can use the file. |
| -> Eff es a |
Lifted withSystemTempFile.
withSystemTempDirectory Source #
Arguments
| :: forall (es :: [Effect]) a. Temporary :> es | |
| => String | Directory name template. See |
| -> (FilePath -> Eff es a) | Callback that can use the directory. |
| -> Eff es a |
Lifted withSystemTempDirectory.
Arguments
| :: forall (es :: [Effect]) a. Temporary :> es | |
| => FilePath | Temp dir to create the file in. |
| -> String | File name template. See |
| -> (FilePath -> Handle -> Eff es a) | Callback that can use the file. |
| -> Eff es a |
Lifted withTempFile.
Arguments
| :: forall (es :: [Effect]) a. Temporary :> es | |
| => FilePath | Temp directory to create the directory in. |
| -> String | Directory name template. See |
| -> (FilePath -> Eff es a) | Callback that can use the directory. |
| -> Eff es a |
Lifted withTempDirectory.