[Haskell] Proposal: Allow "\=" for field update in record update
syntax
Benjamin Franksen
benjamin.franksen at bessy.de
Fri Mar 4 18:25:15 EST 2005
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
More information about the Haskell
mailing list