4 Mar
2005
4 Mar
'05
11:25 p.m.
On Friday 04 March 2005 23:44, Keean Schupke wrote:
Benjamin Franksen wrote:
Consider:
class Bogus a b instance Bogus Int Char
How do you express the /instance/ in TH? Using AppT?
That would be:
(using 6.4 syntax)
AppT (AppT (ConT (mkName "Bogus")) (ConT ''Int)) (ConT ''Char)
If the instance is using type variables:
instance Bogus Int a
you get:
AppT (AppT (ConT (mkName "Bogus")) (ConT ''Int)) (VarT (mkName "a"))
OK, I can see now that this makes sense syntactically. Still, it is strange that the class name is handled as if it were a type constructor. Anyway, thanks. Ben