Is it possible to implement syb-style transformation/query functions with GHC.Generics?


Is it possible to implement syb-style transformation/query functions with GHC.Generics?

syb style generics offer handy transformation/query functions like gmapT/gmapQ. They make use of runtime type info via Typeable, I wonder if this can be avoided if similar combinators can be developed using GHC.Generics. Is it possible in principle? Thanks!

Submitted July 13, 2017 at 10:25AM by terrorjack
via reddit http://ift.tt/2vgC5k2

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s