Bidirectional isomorphism that is partial in the backward direction.
This can be used to express constructor-deconstructor pairs. For example:
nil :: Piso t ([a] :- t) nil = Piso f g where f t =  :- t g ( :- t) = Just t g _ = Nothing cons :: Piso (a :- [a] :- t) ([a] :- t) cons = Piso f g where f (x :- xs :- t) = (x : xs) :- t g ((x : xs) :- t) = Just (x :- xs :- t) g _ = Nothing
:- can be read as 'cons', forming a stack of values. For example,
 onto the stack; or, in the backward direction, tries to
 from the stack. Representing constructor-destructor pairs as
stack manipulators allows them to be composed more easily.
Pisos for some common datatypes.
Data.Piso.TH offer generic ways of deriving
Pisos for custom datatypes.
A type class that expresses that a category is able to embed