TH: 'name syntax does not work for some names

Duncan Coutts duncan.coutts at worcester.oxford.ac.uk
Tue Jun 15 20:48:38 EDT 2004


Here's another low priority TH buglet:

Prelude> ''[]
GHC.Base.[]	--works as expected
Prelude> '[]
<interactive>:1:1: parse error on input `['

There is a similar parsing problem for these names:
()   (,)   (,,)  etc

All of these work when you use ''() to get the name of the type.

While we're on the topic it'd be nice to have a function which gives you
the name of the n'th tuple type/function, eg
tupleName     5 ==  '(,,,,)
tupleTypeName 5 == ''(,,,,)

Duncan




More information about the Glasgow-haskell-bugs mailing list