Modern haskell implementation of generically derived bifunctors

320 views Asked by At

I'm looking for a way to derive fmapFirst and fmapSecond for bifunctors automatically. I would prefer a way to do it using the new Generic type class or using Data.Data, and without Template Haskell.

(Note that I already know that https://hackage.haskell.org/package/genifunctors-0.2.2.0/docs/Data-Generics-Genifunctors.html supports this with use of Template Haskell, I wish to know if Template Haskell can be avoided here)

0

There are 0 answers