[bitc-dev] Confusion: multiparameter type classes
Jonathan S. Shapiro
shap at eros-os.org
Sun Jul 24 20:14:41 EDT 2005
On Sun, 2005-07-24 at 13:49 -0700, Mark P Jones wrote:
> But I think again that you were really trying to capture what I said
> above about constraining every instance of a type class to be a tuple
> of some fixed arity. While one could probably base the theory around
> this, it seems a little artificial, and would require additional
> notation and/or machinery to describe selection of type components
> from tuples. It seems much simpler to me to treat multiple parameter
> type classes directly, and to interpret them simply as n-ary relations
> between types.
I can see that. I think what is happening is that type classes are a
form of type constraint, which led me into type constraints more
generally, which led me to test my intuition about what relationship
might exist between type constraints and type classes.
Having done so, it seems a perfectly reasonable language position to say
that a type constraint is not a type (and therefore not a subset of some
polymorphic tuple type), but is rather a set of n-ary relations as you
suggest.
shap
More information about the bitc-dev
mailing list