Safe Haskell | None |
---|
- derivePisos :: Name -> Q Exp
Documentation
derivePisos :: Name -> Q ExpSource
Derive partial isomorphisms for a given datatype. The resulting expression is a tuple with one isomorphism element for each constructor in the datatype.
For example:
nothing :: Piso t (Maybe a :- t) just :: Piso (a :- t) (Maybe a :- t) (nothing, just) = $(derivePisos ''Maybe)
Deriving isomorphisms this way requires -XNoMonoPatBinds
.