Closed Drezil closed 5 years ago
It's a bit more involved, we need to add a newtype for this, but nothing too challenging. It would look like
data T a = T { unT :: a }
deriving Show via Surgery Derecordify (T a)
for some newtype Surgery
and after making Derecordify
a defunctionalized symbol (to be able to reuse its name).
How's #14 look?
Cool! Thank you!
I just released 0.6.0.0
!
We can derive many things using derivingVia and this package.
Is it possible to derive surgically altered things with deriving via? I could not get it compiling..
i.e. instead of
something like
latter yields the error
Is it just a missing instance
Coercible (Derecordify a) a
andCoercible a (Derecordify a)
? Or is this harder to fix?