Closed Icelandjack closed 3 years ago
This is by design, as the GFoldable
class is meant to be a pedagogical example that is separate from the Foldable
class in base
. The README
talks about this:
It is worth emphasizing that these modules are primarly intended for educational purposes. Many of the classes in these modules resemble other commonly used classes—for example,
GShow
fromGenerics.Deriving.Show
resemblesShow
frombase
—but in general, the classes thatgeneric-deriving
defines are not drop-in replacements. Moreover, the generic defaults thatgeneric-deriving
provide often make simplifying assumptions that may violate expectations of how these classes might work elsewhere. For example, the generic default forGShow
does not behave exactly likederiving Show
would.If you are seeking
GHC.Generics
-based defaults for type classes inbase
, consider using thegeneric-data
library.
As such, I'm going to close this as being outside the scope of generic-deriving
.
I tried making a
Foldable
instance ofGenerically1
so that I could deriveand it seemed like
needed to be changed to
Foldable