Haskell' - class aliases

Simon Peyton-Jones simonpj at microsoft.com
Fri May 2 06:24:11 EDT 2008

| The more I think about it, I think 'superclass' is just the wrong
| terminology for dealing with class aliases. Superclass implies a strict
| partial order on classes, which just isn't the case for class aliases,
| for instance
| > class alias Foo a => Foo a = Bar a where ...

Crumbs!  I have no idea what that means!  Did you really mean to repeat "Foo"?  According to your expansion in type signatures
        f :: (Foo a) => ...
expands to
        f :: (Foo a, Bar a) => ...
which presumably expands again.  I'm totally lost here

Have a look at my last message, which gives a variant of your desugaring that IMHO greatly clarifies the meaning of (what I understand by) aliases.


More information about the Haskell-prime mailing list