How to user-define a type equality constraint?

Anthony Clayden anthony_clayden at clear.net.nz
Tue Apr 6 11:44:14 UTC 2021


> But why does this matter?

Because I want the semantics of that equality constraint, without switching
on any of these, which I don't otherwise use:

GADTs
TypeFamilies
TypeOperators

And if that means I can't use infix `~` in my constraints, I'll put up with
that. (I'd user-define a conventional class, say `TypeCast`. Could be that
has to be defined in terms of `~`, in which case I'd put that in a shim
module as the only place with those extensions.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/glasgow-haskell-users/attachments/20210406/0590ca87/attachment.html>


More information about the Glasgow-haskell-users mailing list