Commit df540a33 authored by chak@cse.unsw.edu.au.'s avatar chak@cse.unsw.edu.au.
Browse files

GADT fixes

Wed Jul 26 06:00:53 EDT 2006  kevind@bu.edu
parent 5dc9a450
......@@ -397,6 +397,7 @@ collectl (L l pat) bndrs
go (TypePat ty) = bndrs
go (DictPat ids1 ids2) = map noLoc ids1 ++ map noLoc ids2
++ bndrs
go (CoPat _ pat ty) = collectl (noLoc pat) bndrs
\end{code}
\begin{code}
......
%
% (c) The GRASP/AQUA Project, Glasgow University, 2000
%
\section[FunDeps]{FunDeps - functional dependencies}
......@@ -20,6 +20,7 @@ import Var ( TyVar )
import Class ( Class, FunDep, pprFundeps, classTvsFds )
import TcGadt ( tcUnifyTys, BindFlag(..) )
import Type ( substTys, notElemTvSubst )
import Coercion ( isEqPred )
import TcType ( Type, PredType(..), tcEqType,
predTyUnique, mkClassPred, tyVarsOfTypes, tyVarsOfPred )
import InstEnv ( Instance(..), InstEnv, instanceHead, classInstances,
......@@ -219,8 +220,9 @@ NOTA BENE:
\begin{code}
improve inst_env preds
= [ eqn | group <- equivClassesByUniq (predTyUnique . fst) preds,
= [ eqn | group <- equivClassesByUniq (predTyUnique . fst) (filterEqPreds preds),
eqn <- checkGroup inst_env group ]
where filterEqPreds = filter (not . isEqPred . fst)
----------
checkGroup :: (Class -> [Instance])
......
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