From: simonpj Date: Mon, 5 Feb 2001 08:48:25 +0000 (+0000) Subject: [project @ 2001-02-05 08:48:25 by simonpj] X-Git-Tag: Approximately_9120_patches~2753 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=e19e95429bbcf3f1a408ec39c33aafad74e15b35;p=ghc-hetmet.git [project @ 2001-02-05 08:48:25 by simonpj] Add (still incomplete) comment --- 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