[m-dev.] type class constraints

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Dec 20 23:30:59 AEDT 1999


On 15-Dec-1999, Michael Day <mcda at cat.cs.mu.OZ.AU> wrote:
> 
> type class constraints are at present only allowed upon type variables and
> not concrete types. This only really affects type classes with multiple
> parameters. For instance:
> 
> :- pred snort(T, T) <= is_funky(T, char).
> 
> This will be flagged as an error by the compiler, stating that such
> constraints are not implemented. Will they be implemented and if so, when?
> The lack of them appears to make multiple parameter type classes less
> useful than they would otherwise be.

I don't quite recall our rationale for not supporting that.
DJ, do you remember?  What would happen if we were to just
uncomment that check?

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list