- deriveIsos :: Name -> Q Exp
Documentation
deriveIsos :: 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 :: Iso t (Maybe a :- t) just :: Iso (a :- t) (Maybe a :- t) (nothing, just) = $(deriveIsos ''Maybe)
Deriving isomorphisms this way requires -XNoMonoPatBinds
.