:: (Coercible s a, Coercible t b) => Iso s t a b -package:generic-optics
Data types that are representationally equal are isomorphic.
This is only available on GHC 7.8+
Data types that are representationally equal are isomorphic.
>>> view coerced 'x' :: Identity Char
Identity 'x'
Capture type constraints as an isomorphism.
Note: This is the identity optic:
>>> :t view equality
view equality :: a -> a