
22 Sep
2013
22 Sep
'13
11:38 a.m.
On Sun, Sep 22, 2013 at 11:07 AM, TP
My misunderstanding came from a confusion between a "context" and a "constraint". The context is what is before the =>, and the constraint is what is after, i.e. the main part of the instance declaration.
Hi TP, I think context and constraint mean the same thing. The haskell report uses the word context for http://www.haskell.org/onlinereport/decls.html for the whole list and constraint for one part of that list (Eq a). With the extension -XConstraintKinds both of those are called Constraint. In other words:
instance Context => InstanceHead
instance (Constraint, Constraint2) => InstanceHead
Regards, Adam