Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- interpretScopedResumableH :: forall param resource effect err r. (forall q x. param -> (resource -> Sem (Stop err ': (Opaque q ': r)) x) -> Sem (Stop err ': (Opaque q ': r)) x) -> (forall q r0 x. resource -> effect (Sem r0) x -> Tactical effect (Sem r0) (Stop err ': (Opaque q ': r)) x) -> InterpreterFor (Scoped param effect !! err) r
- interpretScopedResumable :: forall param resource effect err r. (forall q x. param -> (resource -> Sem (Stop err ': (Opaque q ': r)) x) -> Sem (Stop err ': (Opaque q ': r)) x) -> (forall q r0 x. resource -> effect (Sem r0) x -> Sem (Stop err ': (Opaque q ': r)) x) -> InterpreterFor (Scoped param effect !! err) r
- interpretScopedResumable_ :: forall param resource effect err r. (forall q. param -> Sem (Stop err ': (Opaque q ': r)) resource) -> (forall q r0 x. resource -> effect (Sem r0) x -> Sem (Stop err ': (Opaque q ': r)) x) -> InterpreterFor (Scoped param effect !! err) r
- interpretScopedResumableWithH :: forall extra param resource effect err r. KnownList extra => (forall q x. param -> (resource -> Sem (extra ++ (Stop err ': (Opaque q ': r))) x) -> Sem (Stop err ': (Opaque q ': r)) x) -> (forall q r0 x. resource -> effect (Sem r0) x -> Tactical effect (Sem r0) (extra ++ ([Stop err, Opaque q] ++ r)) x) -> InterpreterFor (Scoped param effect !! err) r
- interpretScopedResumableWith :: forall extra param resource effect err r. KnownList extra => (forall q x. param -> (resource -> Sem (extra ++ (Stop err ': (Opaque q ': r))) x) -> Sem (Stop err ': (Opaque q ': r)) x) -> (forall q r0 x. resource -> effect (Sem r0) x -> Sem (extra ++ (Stop err ': (Opaque q ': r))) x) -> InterpreterFor (Scoped param effect !! err) r
- interpretScopedResumableWith_ :: forall extra param effect err r. KnownList extra => (forall q x. param -> Sem (extra ++ (Stop err ': (Opaque q ': r))) x -> Sem (Stop err ': (Opaque q ': r)) x) -> (forall q r0 x. effect (Sem r0) x -> Sem (extra ++ (Stop err ': (Opaque q ': r))) x) -> InterpreterFor (Scoped param effect !! err) r
- interpretResumableScopedH :: forall param resource effect err r. (forall q x. param -> (resource -> Sem (Opaque q ': r) x) -> Sem (Opaque q ': r) x) -> (forall q r0 x. resource -> effect (Sem r0) x -> Tactical (effect !! err) (Sem r0) (Stop err ': (Opaque q ': r)) x) -> InterpreterFor (Scoped param (effect !! err)) r
- interpretResumableScoped :: forall param resource effect err r. (forall q x. param -> (resource -> Sem (Opaque q ': r) x) -> Sem (Opaque q ': r) x) -> (forall q r0 x. resource -> effect (Sem r0) x -> Sem (Stop err ': (Opaque q ': r)) x) -> InterpreterFor (Scoped param (effect !! err)) r
- interpretResumableScoped_ :: forall param resource effect err r. (param -> Sem r resource) -> (forall q r0 x. resource -> effect (Sem r0) x -> Sem (Stop err ': (Opaque q ': r)) x) -> InterpreterFor (Scoped param (effect !! err)) r
- interpretResumableScopedWithH :: forall extra param resource effect err r. KnownList extra => (forall q x. param -> (resource -> Sem (extra ++ (Opaque q ': r)) x) -> Sem (Opaque q ': r) x) -> (forall q r0 x. resource -> effect (Sem r0) x -> Tactical (effect !! err) (Sem r0) (Stop err ': (extra ++ (Opaque q ': r))) x) -> InterpreterFor (Scoped param (effect !! err)) r
- interpretResumableScopedWith :: forall extra param resource effect err r. KnownList extra => (forall q x. param -> (resource -> Sem (extra ++ (Opaque q ': r)) x) -> Sem (Opaque q ': r) x) -> (forall r0 x. resource -> effect (Sem r0) x -> Sem (Stop err ': (extra ++ r)) x) -> InterpreterFor (Scoped param (effect !! err)) r
- interpretResumableScopedWith_ :: forall extra param effect err r. KnownList extra => (forall q x. param -> Sem (extra ++ (Opaque q ': r)) x -> Sem (Opaque q ': r) x) -> (forall r0 x. effect (Sem r0) x -> Sem (Stop err ': (extra ++ r)) x) -> InterpreterFor (Scoped param (effect !! err)) r
- interpretScopedRH :: forall param resource effect eo ei r. (forall q x. param -> (resource -> Sem (Stop eo ': (Opaque q ': r)) x) -> Sem (Stop eo ': (Opaque q ': r)) x) -> (forall q r0 x. resource -> effect (Sem r0) x -> Tactical (effect !! ei) (Sem r0) (Stop ei ': (Stop eo ': (Opaque q ': r))) x) -> InterpreterFor (Scoped param (effect !! ei) !! eo) r
- interpretScopedR :: forall param resource effect eo ei r. (forall q x. param -> (resource -> Sem (Stop eo ': (Opaque q ': r)) x) -> Sem (Stop eo ': (Opaque q ': r)) x) -> (forall q r0 x. resource -> effect (Sem r0) x -> Sem (Stop ei ': (Stop eo ': (Opaque q ': r))) x) -> InterpreterFor (Scoped param (effect !! ei) !! eo) r
- interpretScopedR_ :: forall param resource effect eo ei r. (param -> Sem (Stop eo ': r) resource) -> (forall q r0 x. resource -> effect (Sem r0) x -> Sem (Stop ei ': (Stop eo ': (Opaque q ': r))) x) -> InterpreterFor (Scoped param (effect !! ei) !! eo) r
- interpretScopedRWithH :: forall extra param resource effect eo ei r. KnownList extra => (forall q x. param -> (resource -> Sem (extra ++ (Stop eo ': (Opaque q ': r))) x) -> Sem (Stop eo ': (Opaque q ': r)) x) -> (forall q r0 x. resource -> effect (Sem r0) x -> Tactical (effect !! ei) (Sem r0) (Stop ei ': (extra ++ (Stop eo ': (Opaque q ': r)))) x) -> InterpreterFor (Scoped param (effect !! ei) !! eo) r
- interpretScopedRWith :: forall extra param resource effect eo ei r. KnownList extra => (forall q x. param -> (resource -> Sem (extra ++ (Stop eo ': (Opaque q ': r))) x) -> Sem (Stop eo ': (Opaque q ': r)) x) -> (forall q r0 x. resource -> effect (Sem r0) x -> Sem (Stop ei ': (extra ++ (Stop eo ': (Opaque q ': r)))) x) -> InterpreterFor (Scoped param (effect !! ei) !! eo) r
- interpretScopedRWith_ :: forall extra param effect eo ei r. KnownList extra => (forall q x. param -> Sem (extra ++ (Stop eo ': (Opaque q ': r))) x -> Sem (Stop eo ': (Opaque q ': r)) x) -> (forall q r0 x. effect (Sem r0) x -> Sem (Stop ei ': (extra ++ (Stop eo ': (Opaque q ': r)))) x) -> InterpreterFor (Scoped param (effect !! ei) !! eo) r
Documentation
interpretScopedResumableH :: forall param resource effect err r. (forall q x. param -> (resource -> Sem (Stop err ': (Opaque q ': r)) x) -> Sem (Stop err ': (Opaque q ': r)) x) -> (forall q r0 x. resource -> effect (Sem r0) x -> Tactical effect (Sem r0) (Stop err ': (Opaque q ': r)) x) -> InterpreterFor (Scoped param effect !! err) r Source #
interpretScopedResumable :: forall param resource effect err r. (forall q x. param -> (resource -> Sem (Stop err ': (Opaque q ': r)) x) -> Sem (Stop err ': (Opaque q ': r)) x) -> (forall q r0 x. resource -> effect (Sem r0) x -> Sem (Stop err ': (Opaque q ': r)) x) -> InterpreterFor (Scoped param effect !! err) r Source #
interpretScopedResumable_ :: forall param resource effect err r. (forall q. param -> Sem (Stop err ': (Opaque q ': r)) resource) -> (forall q r0 x. resource -> effect (Sem r0) x -> Sem (Stop err ': (Opaque q ': r)) x) -> InterpreterFor (Scoped param effect !! err) r Source #
interpretScopedResumableWithH :: forall extra param resource effect err r. KnownList extra => (forall q x. param -> (resource -> Sem (extra ++ (Stop err ': (Opaque q ': r))) x) -> Sem (Stop err ': (Opaque q ': r)) x) -> (forall q r0 x. resource -> effect (Sem r0) x -> Tactical effect (Sem r0) (extra ++ ([Stop err, Opaque q] ++ r)) x) -> InterpreterFor (Scoped param effect !! err) r Source #
interpretScopedResumableWith :: forall extra param resource effect err r. KnownList extra => (forall q x. param -> (resource -> Sem (extra ++ (Stop err ': (Opaque q ': r))) x) -> Sem (Stop err ': (Opaque q ': r)) x) -> (forall q r0 x. resource -> effect (Sem r0) x -> Sem (extra ++ (Stop err ': (Opaque q ': r))) x) -> InterpreterFor (Scoped param effect !! err) r Source #
interpretScopedResumableWith_ :: forall extra param effect err r. KnownList extra => (forall q x. param -> Sem (extra ++ (Stop err ': (Opaque q ': r))) x -> Sem (Stop err ': (Opaque q ': r)) x) -> (forall q r0 x. effect (Sem r0) x -> Sem (extra ++ (Stop err ': (Opaque q ': r))) x) -> InterpreterFor (Scoped param effect !! err) r Source #
Combined interpreter for Scoped
and Resumable
that allows the handler to use additional effects that are
interpreted by the resource allocator.
This allows Stop
to be sent from within the resource allocator so that the consumer receives it, terminating the
entire scope.
In this variant, no resource is used and the allocator is a plain interpreter.
interpretResumableScopedH :: forall param resource effect err r. (forall q x. param -> (resource -> Sem (Opaque q ': r) x) -> Sem (Opaque q ': r) x) -> (forall q r0 x. resource -> effect (Sem r0) x -> Tactical (effect !! err) (Sem r0) (Stop err ': (Opaque q ': r)) x) -> InterpreterFor (Scoped param (effect !! err)) r Source #
interpretResumableScoped :: forall param resource effect err r. (forall q x. param -> (resource -> Sem (Opaque q ': r) x) -> Sem (Opaque q ': r) x) -> (forall q r0 x. resource -> effect (Sem r0) x -> Sem (Stop err ': (Opaque q ': r)) x) -> InterpreterFor (Scoped param (effect !! err)) r Source #
interpretResumableScoped_ :: forall param resource effect err r. (param -> Sem r resource) -> (forall q r0 x. resource -> effect (Sem r0) x -> Sem (Stop err ': (Opaque q ': r)) x) -> InterpreterFor (Scoped param (effect !! err)) r Source #
interpretResumableScopedWithH :: forall extra param resource effect err r. KnownList extra => (forall q x. param -> (resource -> Sem (extra ++ (Opaque q ': r)) x) -> Sem (Opaque q ': r) x) -> (forall q r0 x. resource -> effect (Sem r0) x -> Tactical (effect !! err) (Sem r0) (Stop err ': (extra ++ (Opaque q ': r))) x) -> InterpreterFor (Scoped param (effect !! err)) r Source #
interpretResumableScopedWith :: forall extra param resource effect err r. KnownList extra => (forall q x. param -> (resource -> Sem (extra ++ (Opaque q ': r)) x) -> Sem (Opaque q ': r) x) -> (forall r0 x. resource -> effect (Sem r0) x -> Sem (Stop err ': (extra ++ r)) x) -> InterpreterFor (Scoped param (effect !! err)) r Source #
interpretResumableScopedWith_ :: forall extra param effect err r. KnownList extra => (forall q x. param -> Sem (extra ++ (Opaque q ': r)) x -> Sem (Opaque q ': r) x) -> (forall r0 x. effect (Sem r0) x -> Sem (Stop err ': (extra ++ r)) x) -> InterpreterFor (Scoped param (effect !! err)) r Source #
Combined interpreter for Resumable
and Scoped
that allows the handler to use additional effects that are
interpreted by the resource allocator.
In this variant:
- Only the handler may send Stop
, but this allows resumption to happen on each action inside of the scope.
- No resource is used and the allocator is a plain interpreter.
interpretScopedRH :: forall param resource effect eo ei r. (forall q x. param -> (resource -> Sem (Stop eo ': (Opaque q ': r)) x) -> Sem (Stop eo ': (Opaque q ': r)) x) -> (forall q r0 x. resource -> effect (Sem r0) x -> Tactical (effect !! ei) (Sem r0) (Stop ei ': (Stop eo ': (Opaque q ': r))) x) -> InterpreterFor (Scoped param (effect !! ei) !! eo) r Source #
Combined higher-order interpreter for Resumable
and Scoped
.
In this variant, both the handler and the scope may send different errors via Stop
, encoding the concept that the
resource allocation may fail to prevent the scope from being executed, and each individual scoped action may fail,
continuing the scope execution on resumption.
interpretScopedR :: forall param resource effect eo ei r. (forall q x. param -> (resource -> Sem (Stop eo ': (Opaque q ': r)) x) -> Sem (Stop eo ': (Opaque q ': r)) x) -> (forall q r0 x. resource -> effect (Sem r0) x -> Sem (Stop ei ': (Stop eo ': (Opaque q ': r))) x) -> InterpreterFor (Scoped param (effect !! ei) !! eo) r Source #
Combined interpreter for Scoped
and Resumable
.
In this variant, both the handler and the scope may send different errors via Stop
, encoding the concept that the
resource allocation may fail to prevent the scope from being executed, and each individual scoped action may fail,
continuing the scope execution on resumption.
interpretScopedR_ :: forall param resource effect eo ei r. (param -> Sem (Stop eo ': r) resource) -> (forall q r0 x. resource -> effect (Sem r0) x -> Sem (Stop ei ': (Stop eo ': (Opaque q ': r))) x) -> InterpreterFor (Scoped param (effect !! ei) !! eo) r Source #
Combined interpreter for Scoped
and Resumable
.
In this variant:
- Both the handler and the scope may send different errors via Stop
, encoding the concept that the
resource allocation may fail to prevent the scope from being executed, and each individual scoped action may fail,
continuing the scope execution on resumption.
- The resource allocator is a plain action.
interpretScopedRWithH :: forall extra param resource effect eo ei r. KnownList extra => (forall q x. param -> (resource -> Sem (extra ++ (Stop eo ': (Opaque q ': r))) x) -> Sem (Stop eo ': (Opaque q ': r)) x) -> (forall q r0 x. resource -> effect (Sem r0) x -> Tactical (effect !! ei) (Sem r0) (Stop ei ': (extra ++ (Stop eo ': (Opaque q ': r)))) x) -> InterpreterFor (Scoped param (effect !! ei) !! eo) r Source #
Combined higher-order interpreter for Scoped
and Resumable
that allows the handler to use additional effects
that are interpreted by the resource allocator.
In this variant, both the handler and the scope may send different errors via Stop
, encoding the concept that the
resource allocation may fail to prevent the scope from being executed, and each individual scoped action may fail,
continuing the scope execution on resumption.
interpretScopedRWith :: forall extra param resource effect eo ei r. KnownList extra => (forall q x. param -> (resource -> Sem (extra ++ (Stop eo ': (Opaque q ': r))) x) -> Sem (Stop eo ': (Opaque q ': r)) x) -> (forall q r0 x. resource -> effect (Sem r0) x -> Sem (Stop ei ': (extra ++ (Stop eo ': (Opaque q ': r)))) x) -> InterpreterFor (Scoped param (effect !! ei) !! eo) r Source #
Combined interpreter for Scoped
and Resumable
that allows the handler to use additional effects that are
interpreted by the resource allocator.
In this variant, both the handler and the scope may send different errors via Stop
, encoding the concept that the
resource allocation may fail to prevent the scope from being executed, and each individual scoped action may fail,
continuing the scope execution on resumption.
interpretScopedRWith_ :: forall extra param effect eo ei r. KnownList extra => (forall q x. param -> Sem (extra ++ (Stop eo ': (Opaque q ': r))) x -> Sem (Stop eo ': (Opaque q ': r)) x) -> (forall q r0 x. effect (Sem r0) x -> Sem (Stop ei ': (extra ++ (Stop eo ': (Opaque q ': r)))) x) -> InterpreterFor (Scoped param (effect !! ei) !! eo) r Source #
Combined interpreter for Scoped
and Resumable
that allows the handler to use additional effects that are
interpreted by the resource allocator.
- Both the handler and the scope may send different errors via Stop
, encoding the concept that the
resource allocation may fail to prevent the scope from being executed, and each individual scoped action may fail,
continuing the scope execution on resumption.
- The resource allocator is a plain action.