[project @ 2001-02-05 08:48:25 by simonpj]
authorsimonpj <unknown>
Mon, 5 Feb 2001 08:48:25 +0000 (08:48 +0000)
committersimonpj <unknown>
Mon, 5 Feb 2001 08:48:25 +0000 (08:48 +0000)
Add (still incomplete) comment

ghc/compiler/types/InstEnv.lhs

index 0586453..a3bb8d4 100644 (file)
@@ -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