Have you read Note [The equality types story] in compiler/prelude/TysPrim?
As you’ll see (~) is actually a class; the equality predicate is (~#).
There doesn’t seems to be a named-function predicate that checks for it explicitly, but if you grep for eqTyCon you’ll see lots of tests for it. I’m sure these tests could be tideied up into a smaller collection of predicates.
ghc-devs mailing list
|Free forum by Nabble||Edit this page|