From 426e298ef208e54ef76351cd56b1567e6fd05599 Mon Sep 17 00:00:00 2001 From: lewie Date: Sat, 10 Jun 2000 00:34:52 +0000 Subject: [PATCH] [project @ 2000-06-10 00:34:52 by lewie] Update instFunDepsOfTheta to accomodate Simon's recent commit (it hadn't needed to generate fundeps for IParams previously). This undoes Simon's comment about `forall a. ?x::a => Int' being ambiguous. It isn't, and now it isn't flagged as such either. I.e, there's nothing wrong with: foo :: ?x::a => Int foo = fst (13, ?x) (of course, less contrived examples can also be given!). --- ghc/compiler/typecheck/Inst.lhs | 2 +- ghc/compiler/typecheck/TcBinds.lhs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ghc/compiler/typecheck/Inst.lhs b/ghc/compiler/typecheck/Inst.lhs index 7ccc480..d4565d0 100644 --- a/ghc/compiler/typecheck/Inst.lhs +++ b/ghc/compiler/typecheck/Inst.lhs @@ -398,7 +398,7 @@ instFunDeps orig theta instFunDepsOfTheta theta = let ifd (Class clas tys) = instantiateFdClassTys clas tys - ifd _ = [] + ifd (IParam n ty) = [([], [ty])] in concat (map ifd theta) newMethodWithGivenTy orig id tys theta tau diff --git a/ghc/compiler/typecheck/TcBinds.lhs b/ghc/compiler/typecheck/TcBinds.lhs index ad10729..3e28615 100644 --- a/ghc/compiler/typecheck/TcBinds.lhs +++ b/ghc/compiler/typecheck/TcBinds.lhs @@ -554,7 +554,6 @@ getTyVarsToGen is_unrestricted mono_id_tys lie let tvFundep = tyVarFunDep fds' extended_tyvars = oclose tvFundep body_tyvars in - -- pprTrace "gTVTG" (ppr (lie, body_tyvars, extended_tyvars)) $ returnNF_Tc (emptyVarSet, extended_tyvars) else -- This recover and discard-errs is to avoid duplicate error -- 1.7.10.4