Module

Dissect.Generic

Package
purescript-dissect
Repository
PureFunctor/purescript-dissect

Polynomial functors and bifunctors for algebraically defining data types with free Dissect instances as described in "Algebra of Programming" by Bird and de Moor; as well as the functional dissections paper.

#Const Source

newtype Const :: forall k. Type -> k -> Typenewtype Const a b

The constant functor, which maps all b to some constant a.

Constructors

Instances

#Const_2 Source

newtype Const_2 :: forall k l. Type -> k -> l -> Typenewtype Const_2 a b c

Constructors

Instances

#Id Source

newtype Id a

The identity functor, which maps all a back into a.

Constructors

Instances

#Product Source

data Product :: forall k. (k -> Type) -> (k -> Type) -> k -> Typedata Product a b c

The product of polynomial functors.

Constructors

Instances

#Product_2 Source

data Product_2 :: forall k l. (k -> l -> Type) -> (k -> l -> Type) -> k -> l -> Typedata Product_2 p q a b

Constructors

Instances

#Sum Source

data Sum :: forall k. (k -> Type) -> (k -> Type) -> k -> Typedata Sum a b c

The sum of polynomial functors.

Constructors

Instances

#Sum_2 Source

data Sum_2 :: forall k l. (k -> l -> Type) -> (k -> l -> Type) -> k -> l -> Typedata Sum_2 p q a b

Constructors

Instances

#type (:*:) Source

Operator alias for Dissect.Generic.Product (right-associative / precedence 5)

#type (:+:) Source

Operator alias for Dissect.Generic.Sum (right-associative / precedence 4)

#(:*:) Source

Operator alias for Dissect.Generic.Product (right-associative / precedence 5)