From: simonpj Date: Tue, 5 Nov 2002 14:10:45 +0000 (+0000) Subject: [project @ 2002-11-05 14:10:44 by simonpj] X-Git-Tag: Approx_11550_changesets_converted~1476 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=64ac3c5fc190617c81c8db8c8050c00794ac026d;p=ghc-hetmet.git [project @ 2002-11-05 14:10:44 by simonpj] Formatting and dead code --- diff --git a/ghc/compiler/typecheck/TcInstDcls.lhs b/ghc/compiler/typecheck/TcInstDcls.lhs index b9cf1eb..6d9f99f 100644 --- a/ghc/compiler/typecheck/TcInstDcls.lhs +++ b/ghc/compiler/typecheck/TcInstDcls.lhs @@ -234,7 +234,7 @@ tcLocalInstDecl1 decl@(InstDecl poly_ty binds uprags Nothing src_loc) in checkValidTheta InstThetaCtxt theta `thenM_` checkAmbiguity tyvars theta (tyVarsOfType tau) `thenM_` - checkValidInstHead tau `thenM` \ (clas,inst_tys) -> + checkValidInstHead tau `thenM` \ (clas,inst_tys) -> checkTc (checkInstFDs theta clas inst_tys) (instTypeErr (pprClassPred clas inst_tys) msg) `thenM_` newDFunName clas inst_tys src_loc `thenM` \ dfun_name -> diff --git a/ghc/compiler/typecheck/TcMType.lhs b/ghc/compiler/typecheck/TcMType.lhs index b7a10b2..daf2acf 100644 --- a/ghc/compiler/typecheck/TcMType.lhs +++ b/ghc/compiler/typecheck/TcMType.lhs @@ -913,8 +913,6 @@ checkAmbiguity forall_tyvars theta tau_tyvars ambig_var ct_var = (ct_var `elem` forall_tyvars) && not (ct_var `elemVarSet` extended_tau_vars) - is_free ct_var = not (ct_var `elem` forall_tyvars) - ambigErr pred = sep [ptext SLIT("Ambiguous constraint") <+> quotes (pprPred pred), nest 4 (ptext SLIT("At least one of the forall'd type variables mentioned by the constraint") $$