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

robert dockins robdockins at fastmail.fm
Fri Mar 4 09:50:36 EST 2005


Lemmih wrote:
> On Fri, 4 Mar 2005 15:26:52 +0100, Benjamin Franksen
> <benjamin.franksen at bessy.de> wrote:
> 
>>On Sunday 20 February 2005 14:19, Keean Schupke wrote:
>>
>>>TH has supported multi-parameter classes for a while... new in 6.4 is
>>>support for fundeps.
>>
>>Yes, but unfortunately TH cannot create instances for them which is usually
>>the boilerplate you want to avoid. From Language.Haskell.TH:
>>
>>data Dec =
>>        ...
>>        ClassD Cxt Name [Name] [FunDep] [Dec]
>>        InstanceD Cxt Type [Dec]
>>        ...
>>
>>Only one 'Type' can be given for an instance.
> 
> 
> And there _should_ only be one type. Checkout 'appT'.
> Some real documentation for TH would clear misconceptions such as this.
> 

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.



More information about the Haskell mailing list