Safe Haskell | Safe-Infered |
---|

- type family ErrorAlg f e a :: *
- type ErrorAlg_PF f e a = forall ix. f (K0 a) ix -> Either e a
- class MkErrorAlg f where
- mkErrorAlg :: ErrorAlg f e a -> ErrorAlg_PF f e a

- errorCata :: HFunctor phi f => ErrorAlg_PF f e r -> phi ix -> HFix (K x :*: f) ix -> Except [(e, x)] r
- (&) :: a -> b -> (a, b)

# Documentation

type family ErrorAlg f e a :: *Source

Type family that converts pattern functors to convenient algebra types.

type ErrorAlg_PF f e a = forall ix. f (K0 a) ix -> Either e aSource

An error algebra over pattern functors.

class MkErrorAlg f whereSource

Converts convenient algebras to algebras that are able to work with pattern functors.

mkErrorAlg :: ErrorAlg f e a -> ErrorAlg_PF f e aSource

MkErrorAlg U | |

(MkErrorAlg f, MkErrorAlg g) => MkErrorAlg (:+: f g) | |

MkErrorAlg f => MkErrorAlg (:*: (I xi) f) | |

MkErrorAlg f => MkErrorAlg (:*: (K a) f) | |

MkErrorAlg f => MkErrorAlg (:>: f xi) |