Deriving instances for GADTs

  • Eq, Ord, Show can be derived using the StandaloneDeriving extension (implicitly using the stock deriving strategy).

  • To derive instances for Some f (where f is your GADT), as well as DSum f g, you will need to use the following libraries :

  • The kind-generics package generalizes the approach of GHC.Generics to GADTs.