From e19e95429bbcf3f1a408ec39c33aafad74e15b35 Mon Sep 17 00:00:00 2001 From: simonpj Date: Mon, 5 Feb 2001 08:48:25 +0000 Subject: [PATCH] [project @ 2001-02-05 08:48:25 by simonpj] Add (still incomplete) comment --- ghc/compiler/types/InstEnv.lhs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ghc/compiler/types/InstEnv.lhs b/ghc/compiler/types/InstEnv.lhs index 0586453..a3bb8d4 100644 --- a/ghc/compiler/types/InstEnv.lhs +++ b/ghc/compiler/types/InstEnv.lhs @@ -387,6 +387,21 @@ determine the second. In general, given the same class decl, and given Then the criterion is: if U=unify(s1,t1) then U(s2) = U(t2). +Matters are a little more complicated if there are free variables in +the s2/t2. + + class D a b c | a -> b + instance D a b => D [(a,a)] [b] Int + instance D a b => D [a] [b] Bool + +The instance decls don't overlap, because the third parameter keeps +them separate. But we want to make sure that given any constraint + D s1 s2 s3 +if s1 matches + + + + \begin{code} badFunDeps :: ClsInstEnv -> Class -> TyVarSet -> [Type] -- Proposed new instance type -- 1.7.10.4