[commit: ghc] master: Comments only (9851275)
git at git.haskell.org
git at git.haskell.org
Thu Jul 23 07:33:40 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/985127510685c3e7ed462260bd69d2e6557430f4/ghc
>---------------------------------------------------------------
commit 985127510685c3e7ed462260bd69d2e6557430f4
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Thu Jul 23 08:34:10 2015 +0100
Comments only
>---------------------------------------------------------------
985127510685c3e7ed462260bd69d2e6557430f4
compiler/typecheck/FunDeps.hs | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/compiler/typecheck/FunDeps.hs b/compiler/typecheck/FunDeps.hs
index 9d4ef1c..997dcc0 100644
--- a/compiler/typecheck/FunDeps.hs
+++ b/compiler/typecheck/FunDeps.hs
@@ -225,12 +225,18 @@ checkClsFD :: FunDep TyVar -> [TyVar] -- One functional dependency f
-> ClsInst -- An instance template
-> TyVarSet -> [Type] -> [Maybe Name] -- Arguments of this (C tys) predicate
-- TyVarSet are extra tyvars that can be instantiated
- -> [([TyVar], [Pair Type])]
+ -> [([TyVar], [Pair Type])] -- Empty or singleton
checkClsFD fd clas_tvs
(ClsInst { is_tvs = qtvs, is_tys = tys_inst, is_tcs = rough_tcs_inst })
extra_qtvs tys_actual rough_tcs_actual
+-- Compare instance {a,b} C sx sp sy sq
+-- with {c,d,e} C tx tp ty tq
+-- for fundep (x,y -> p,q) from class (C x p y q)
+-- If (sx,sy) unifies with (tx,ty), take the subst S
+--
+
-- 'qtvs' are the quantified type variables, the ones which an be instantiated
-- to make the types match. For example, given
-- class C a b | a->b where ...
More information about the ghc-commits
mailing list