Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
runFinalSem :: Sem (Final (Sem r) ': r) a -> Sem r a Source #
Run a
effect if the remaining effect stack is Final
(Sem
r)r
.
This is sometimes useful for interpreters that make use of
reinterpret
, raiseUnder
, or any of their friends.
lowerFinal :: Member (Embed m) r => (forall x. Sem r x -> m x) -> Sem (Final m ': r) a -> Sem r a Source #
Run a
effect by providing an explicit lowering function.Final
m
Beware: The lowering function may be invoked multiple times, so don't do any initialization work inside the lowering function: it will be duplicated.