Is there a way to write Plated
instances using generic-lens
? optics
has gplate
– is there something similar for the lens
universe?
data Expr = Lit Int | Add Expr Expr deriving Generic
instance Plated Expr where
plate = -- what goes here?
I tried types
but that appears to behave as id
when s
and a
match (like biplate does).