Commit 5574c3af authored by simonpj@microsoft.com's avatar simonpj@microsoft.com

Complete definition of cmPredX to take account of EqPred

parent a6590d21
......@@ -1028,9 +1028,13 @@ cmpPredX env (IParam n1 ty1) (IParam n2 ty2) = (n1 `compare` n2) `thenCmp` cmpTy
-- This comparison is used exclusively (I think) for the
-- finite map built in TcSimplify
cmpPredX env (ClassP c1 tys1) (ClassP c2 tys2) = (c1 `compare` c2) `thenCmp` cmpTypesX env tys1 tys2
cmpPredX env (IParam _ _) (ClassP _ _) = LT
cmpPredX env (ClassP _ _) (IParam _ _) = GT
cmpPredX env (EqPred ty1 ty2) (EqPred ty1' ty2') = (cmpTypeX env ty1 ty1') `thenCmp` (cmpTypeX env ty2 ty2')
-- Constructor order: IParam < ClassP < EqPred
cmpPredX env (IParam {}) _ = LT
cmpPredX env (ClassP {}) (IParam {}) = GT
cmpPredX env (ClassP {}) (EqPred {}) = LT
cmpPredX env (EqPred {}) _ = GT
\end{code}
PredTypes are used as a FM key in TcSimplify,
......
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