Annotations and Template Haskell

Bertram Felgenhauer bertram.felgenhauer at googlemail.com
Mon Mar 8 05:28:10 EST 2010


Hello,

I'm wondering whether annotations [1] could be made available to
Template Haskell users as a ghc specific extension.

Would that be feasible? Would it be useful?

An example use would be annotating a type with a representation of a
default value that could be used in generating instances for various
type classes (like parsers that take the default value into account).

The alternative would be to pass that representation explicitely to
every single Template Haskell invocation that uses it.

Regards,

Bertram

[1] http://hackage.haskell.org/trac/ghc/wiki/Annotations


More information about the Glasgow-haskell-users mailing list