Commit ceaf7f10 authored by niteria's avatar niteria
Browse files

Implement Eq TyCon directly

Eq TyCon is defined in terms of Ord TyCon, but we want to
remove Ord TyCon, because it's implemented in terms of unique
comparison, which is nondeterministic.

GHC Trac: #4012
parent 48385cb2
......@@ -2072,8 +2072,8 @@ tyConRuntimeRepInfo _ = NoRRI
-}
instance Eq TyCon where
a == b = case (a `compare` b) of { EQ -> True; _ -> False }
a /= b = case (a `compare` b) of { EQ -> False; _ -> True }
a == b = getUnique a == getUnique b
a /= b = getUnique a /= getUnique b
instance Ord TyCon where
a <= b = case (a `compare` b) of { LT -> True; EQ -> True; GT -> False }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment