[Haskell] Proposal: Allow "\=" for field update in record update syntax

Benjamin Franksen benjamin.franksen at bessy.de
Fri Mar 4 15:56:02 EST 2005

On Friday 04 March 2005 16:32, Keean Schupke wrote:
> robert dockins wrote:
> > Is that really how this is done?  That doesn't seem like it can be right:
> >
> > instance X (a b)  -- single parameter class where 'a' has an arrow kind
> >
> > is very different from:
> >
> > instance X a b    -- multiple parameter class
> >
> > I would expect a type constructed with 'appT' to correspond to the
> > first declaration, and not to the second.
> Yup, thats how it is done, I have some complex working TH that generates
> multi parameter classes with fundeps
> instances etc... and I can say for definite it all works fine:
> For the above examples
> appT X (appT a b) -- X is applied once (to a applied to b)
> appT (appT X a) b -- X is applied twice first to a then to b

But this has nothing to do with the instance question. I agree with Robert 

	AppT a b

definitely sounds like type constructor application. How can this help with 
multi parameter class instances? Consider:

	class Bogus a b
	instance Bogus Int Char

How do you express the /instance/ in TH? Using AppT? AppT would make sense for

	instance Show a => Show [a] where ...

where one would express the '[a]' in TH as

	AppT ListT (VarT mkName "a")


More information about the Haskell mailing list