Commit 98512751 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Comments only

parent 5c3fc921
......@@ -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 ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment