I'm working on getting annotated versions of all instances of a function of a typeclass, and was wondering what are the relation/differences between Template Haskell and the Rewrite Rules section. Of course this is specific to GHC.
Another question, in Racket, primitive function application is denoted #%app. And using macros I can re-export #%app to be a different function f, so a program:
(g a) is rewritten into (f g a)
is there a way to do the same thing using TH or Rewrite Rules?
Thanks