[Haskell-cafe] parametrized data types and Template Haskell

Maarten Faddegon haskell-cafe at maartenfaddegon.nl
Tue Dec 31 13:20:14 UTC 2013


Thanks for thinking with me Adam.

It turned out the error message "Illegal type constructor or class
name" was spot on, because I wrote:

> tvname :: TyVarBndr -> Type
> tvname (PlainTV  name  )    = ConT name
> tvname (KindedTV name _) = ConT name

But should have written:

> tvname :: TyVarBndr -> Type
> tvname (PlainTV  name  )    = VarT name
> tvname (KindedTV name _) = VarT name

Happy new year to all of you!

Maarten


More information about the Haskell-Cafe mailing list