How to user-define a type equality constraint?

Richard Eisenberg rae at
Tue Apr 6 02:49:40 UTC 2021

> On Apr 1, 2021, at 8:12 PM, Anthony Clayden <anthony_clayden at> wrote:
> Can I user-define a conventional type-class that behaves more like `(~)`?

I don't think so.

But why does this matter? I can't define `Char` in user code, but it's exported from the Prelude and requires no extensions. While I can define Eq in user code, I can't make `deriving` work with my version. I can't define `error` in user code. There are many others, I'm sure.

So: why does this matter?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Glasgow-haskell-users mailing list