I would like to teach GHC to derive new typeclasses. Is it possible to do this externally without using Generic
or TemplateHaskell? Like, with source plugins or something similar. So I can write:
data MyType = ...
deriving MyTypeClass
UPDATE: Relevant GHC ticket with discussion: