diff options
author | lewie <unknown> | 2000-06-10 00:34:52 +0000 |
---|---|---|
committer | lewie <unknown> | 2000-06-10 00:34:52 +0000 |
commit | 426e298ef208e54ef76351cd56b1567e6fd05599 (patch) | |
tree | cec5f7014201f57fe38a876d8b3c140fe211be3c | |
parent | d76863bb7fbb933695b39b06da92246676506f16 (diff) | |
download | haskell-426e298ef208e54ef76351cd56b1567e6fd05599.tar.gz |
[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!).
-rw-r--r-- | ghc/compiler/typecheck/Inst.lhs | 2 | ||||
-rw-r--r-- | ghc/compiler/typecheck/TcBinds.lhs | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/ghc/compiler/typecheck/Inst.lhs b/ghc/compiler/typecheck/Inst.lhs index 7ccc480eb1..d4565d01d1 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 ad10729e7f..3e28615ed8 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 |