Why does a class constraint prevent me from defining a row type

Viewed 51

Say I try to define type Test o e = Nub o e => e

Then I get an error on the final e telling me it can't match #Type with Type

But type Test o e = Nub o e => Record e works fine, so I suppose it doesn't want me to use a row type variable as the result of my definition.

And then type Test (e :: #Type) = e does work, so there's nothing wrong with having a #Type there normally.

So something about the Nub constraint is changing the rules about what sort of type I can define, but I don't see how. What's going on here?

0 Answers
Related