From: simonpj@microsoft.com Date: Mon, 6 Feb 2006 11:20:31 +0000 (+0000) Subject: Remove unused constructor in SourceTypeCtxt X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=de1f31656d83f0dbc298c4d2da50a2e2aa1ff769 Remove unused constructor in SourceTypeCtxt --- diff --git a/ghc/compiler/typecheck/TcMType.lhs b/ghc/compiler/typecheck/TcMType.lhs index b8ea73a..200bb26 100644 --- a/ghc/compiler/typecheck/TcMType.lhs +++ b/ghc/compiler/typecheck/TcMType.lhs @@ -866,14 +866,11 @@ data SourceTyCtxt -- f :: N a -> N a | InstThetaCtxt -- Context of an instance decl -- instance => C [a] where ... - | InstHeadCtxt -- Head of an instance decl - -- instance ... => Eq a where ... pprSourceTyCtxt (ClassSCCtxt c) = ptext SLIT("the super-classes of class") <+> quotes (ppr c) pprSourceTyCtxt SigmaCtxt = ptext SLIT("the context of a polymorphic type") pprSourceTyCtxt (DataTyCtxt tc) = ptext SLIT("the context of the data type declaration for") <+> quotes (ppr tc) pprSourceTyCtxt InstThetaCtxt = ptext SLIT("the context of an instance declaration") -pprSourceTyCtxt InstHeadCtxt = ptext SLIT("the head of an instance declaration") pprSourceTyCtxt TypeCtxt = ptext SLIT("the context of a type") \end{code} @@ -909,7 +906,6 @@ check_source_ty dflags ctxt pred@(ClassP cls tys) arity_err = arityErr "Class" class_name arity n_tys how_to_allow = case ctxt of - InstHeadCtxt -> empty -- Should not happen InstThetaCtxt -> parens undecidableMsg other -> parens (ptext SLIT("Use -fglasgow-exts to permit this")) @@ -930,8 +926,6 @@ check_source_ty dflags ctxt sty = failWithTc (badSourceTyErr sty) check_class_pred_tys dflags ctxt tys = case ctxt of TypeCtxt -> True -- {-# SPECIALISE instance Eq (T Int) #-} is fine - InstHeadCtxt -> True -- We check for instance-head - -- formation in checkValidInstHead InstThetaCtxt -> undecidable_ok || distinct_tyvars tys other -> gla_exts || all tyvar_head tys where