Safe Haskell | None |
---|---|
Language | Haskell98 |
- derivePisos :: Name -> Q Exp
Documentation
derivePisos :: Name -> Q Exp Source #
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
.