X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcRnTypes.lhs;h=ebf410169c8c29c8aaf0769d01fc768125bb9cd1;hp=20262c968e256ecb7d51799f00c39ccee5187d84;hb=7539ed8cade66d09fae1e0ccc66c519cafa3b55b;hpb=0ffd1de9f595340f18cb94d57c99ded44826455d diff --git a/compiler/typecheck/TcRnTypes.lhs b/compiler/typecheck/TcRnTypes.lhs index 20262c9..ebf4101 100644 --- a/compiler/typecheck/TcRnTypes.lhs +++ b/compiler/typecheck/TcRnTypes.lhs @@ -219,7 +219,7 @@ data TcGblEnv -- Nothing <=> Don't retain renamed decls tcg_binds :: LHsBinds Id, -- Value bindings in this module - tcg_deprecs :: Deprecations, -- ...Deprecations + tcg_warns :: Warnings, -- ...Warnings and deprecations tcg_insts :: [Instance], -- ...Instances tcg_fam_insts :: [FamInst], -- ...Family instances tcg_rules :: [LRuleDecl Id], -- ...Rules @@ -234,9 +234,9 @@ type RecFieldEnv = NameEnv [Name] -- Maps a constructor name *in this module* -- to the fields for that constructor -- This is used when dealing with ".." notation in record -- construction and pattern matching. - -- The FieldEnv deals *only* with constructors defined in - -- *thie* module. For imported modules, we get the same info - -- from the TypeEnv + -- The FieldEnv deals *only* with constructors defined in *thie* + -- module. For imported modules, we get the same info from the + -- TypeEnv \end{code} %************************************************************************ @@ -730,7 +730,8 @@ than with the Avails handling stuff in TcSimplify \begin{code} instance Ord Inst where - compare = cmpInst + compare = cmpInst + -- Used *only* for AvailEnv in TcSimplify instance Eq Inst where (==) i1 i2 = case i1 `cmpInst` i2 of @@ -761,11 +762,12 @@ cmpInst i1@(ImplicInst {}) i2@(ImplicInst {}) = tci_name i1 `compare` tci_name i cmpInst (ImplicInst {}) _ = LT -- same for Equality constraints -cmpInst (EqInst {}) (Dict {}) = GT -cmpInst (EqInst {}) (Method {}) = GT -cmpInst (EqInst {}) (LitInst {}) = GT -cmpInst (EqInst {}) (ImplicInst {}) = GT -cmpInst i1@(EqInst {}) i2@(EqInst {}) = tci_name i1 `compare` tci_name i2 +cmpInst (EqInst {}) (Dict {}) = GT +cmpInst (EqInst {}) (Method {}) = GT +cmpInst (EqInst {}) (LitInst {}) = GT +cmpInst (EqInst {}) (ImplicInst {}) = GT +cmpInst i1@(EqInst {}) i2@(EqInst {}) = (tci_left i1 `tcCmpType` tci_left i2) `thenCmp` + (tci_right i1 `tcCmpType` tci_right i2) \end{code}