Safe Haskell | None |
---|---|

Language | Haskell2010 |

## Synopsis

- data Error e m a where
- throw :: forall e r a. Member (Error e) r => e -> Sem r a
- catch :: forall e r a. Member (Error e) r => Sem r a -> (e -> Sem r a) -> Sem r a
- runError :: Sem (Error e ': r) a -> Sem r (Either e a)
- runErrorAsAnother :: Member (Error e2) r => (e1 -> e2) -> Sem (Error e1 ': r) a -> Sem r a
- runErrorInIO :: (Typeable e, Member (Lift IO) r) => (forall x. Sem r x -> IO x) -> Sem (Error e ': r) a -> Sem r (Either e a)

# Effect

data Error e m a where Source #

## Instances

type DefiningModule (Error :: Type -> (k -> Type) -> k -> Type) Source # | |

Defined in Polysemy.Error |

# Actions

# Interpretations

runErrorAsAnother :: Member (Error e2) r => (e1 -> e2) -> Sem (Error e1 ': r) a -> Sem r a Source #

Transform one `Error`

into another. This function can be used to aggregate
multiple errors into a single type.

*Since: 0.2.2.0*