mkSpecOcc, mkForeignExportOcc, mkGenOcc1, mkGenOcc2,
mkDataTOcc, mkDataCOcc, mkDataConWorkerOcc,
mkSuperDictSelOcc, mkLocalOcc, mkMethodOcc, mkInstTyTcOcc,
- mkInstTyCoOcc,
+ mkInstTyCoOcc, mkEqPredCoOcc,
-- ** Deconstruction
occNameFS, occNameString, occNameSpace,
(OccName sp1 s1) == (OccName sp2 s2) = s1 == s2 && sp1 == sp2
instance Ord OccName where
- compare (OccName sp1 s1) (OccName sp2 s2) = (s1 `compare` s2) `thenCmp`
- (sp1 `compare` sp2)
+ -- Compares lexicographically, *not* by Unique of the string
+ compare (OccName sp1 s1) (OccName sp2 s2)
+ = (s1 `compare` s2) `thenCmp` (sp1 `compare` sp2)
\end{code}
mkForeignExportOcc = mk_simple_deriv varName "$f"
mkNewTyCoOcc = mk_simple_deriv tcName ":Co"
mkInstTyCoOcc = mk_simple_deriv tcName ":Co" -- derived from rep ty
+mkEqPredCoOcc = mk_simple_deriv tcName "$co"
-- Generic derivable classes
mkGenOcc1 = mk_simple_deriv varName "$gfrom"