Module

Control.Isomorphism.Partial.Prim

Package
purescript-partial-isomorphisms
Repository
paulyoung/purescript-partial-isomorphisms

#ignore Source

ignore :: forall a. a -> Iso a Unit

#split Source

split :: forall d c b a. Iso a b -> Iso c d -> Iso (Tuple a c) (Tuple b d)

The product type constructor Tuple is a bifunctor from Iso x Iso to Iso, so that we have the bifunctorial map *** which allows two separate isomorphisms to work on the two components of a tuple.

#(***) Source

Operator alias for Control.Isomorphism.Partial.Prim.split (left-associative / precedence 9)

#associate Source

associate :: forall c b a. Iso (Tuple a (Tuple b c)) (Tuple (Tuple a b) c)

Nested products associate.

#commute Source

commute :: forall b a. Iso (Tuple a b) (Tuple b a)

Products commute.

#unit Source

unit :: forall a. Iso a (Tuple a Unit)

Data.Unit.unit is the unit element for products.

#distribute Source

distribute :: forall c b a. Iso (Tuple a (Either b c)) (Either (Tuple a b) (Tuple a c))

Products distribute over sums.

#element Source

element :: forall a. Eq a => a -> Iso Unit a

element x is the partial isomorphism between Data.Unit.unit and the singleton set which contains just x.

#subset Source

subset :: forall a. (a -> Boolean) -> Iso a a

For a predicate p, subset p is the identity isomorphism restricted to elements matching the predicate.

#iterate Source

iterate :: forall a. Iso a a -> Iso a a