We have a lot of stuff about deriving for you!
DerivingStrategies– The GHC extension that enables multiple
derivingclauses that request a specific deriving strategy, why it exists, and what the deriving strategies are.
Stock deriving extensions – The classes that can be generated using the
stockderiving strategy but require enabling additional GHC extensions, including an example of using
DerivingVia(new in GHC 8.6) – This is where it gets exciting: The
viaderiving strategy lets types steal typeclass instances from other types! We run through a bunch of examples here. You might also find this page helpful if you need a refresher on kinds.
Transformers and deriving – An extended example that illustrates the delightful synergy between monad transformers and
DerivingVia. We give a beginners’ introduction to
ReaderT, no prior knowledge of transformers required.