Module
Data.Functor.Polynomial.Variant
- Package
- purescript-dissect
- Repository
- PureFunctor/purescript-dissect
This module provides a VariantF
-like type specialized to contain
polynomial functors and to be dissectible itself. Likewise,
operations such as inj
, case_
, and on
are also provided.
See also: https://pursuit.purescript.org/packages/purescript-variant/
#VariantF Source
data VariantF :: forall k. Row (k -> Type) -> k -> Type
data VariantF r a
Instances
Functor (VariantF r)
(RowToList r r', DissectRow r' s', ListToRow s' s) => Dissect (VariantF r) (VariantF_2 s)
(RowToList r r', DissectRow r' s', PlugRow r' s', ListToRow s' s) => Plug (VariantF r) (VariantF_2 s)
#VariantF_2 Source
data VariantF_2 :: Row (Type -> Type -> Type) -> Type -> Type -> Type
data VariantF_2 r a b
Instances
Bifunctor (VariantF_2 r)
(RowToList r r', DissectRow r' s', ListToRow s' s) => Dissect (VariantF r) (VariantF_2 s)
(RowToList r r', DissectRow r' s', PlugRow r' s', ListToRow s' s) => Plug (VariantF r) (VariantF_2 s)
#DissectRow Source
class DissectRow :: RowList (Type -> Type) -> RowList (Type -> Type -> Type) -> Constraint
class DissectRow r s | r -> s
Instances
DissectRow Nil Nil
(DissectRow r s, Dissect p q) => DissectRow (Cons n p r) (Cons n q s)