summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/typecheck/TcPat.lhs26
1 files changed, 0 insertions, 26 deletions
diff --git a/compiler/typecheck/TcPat.lhs b/compiler/typecheck/TcPat.lhs
index 468cab56ad..f23c807791 100644
--- a/compiler/typecheck/TcPat.lhs
+++ b/compiler/typecheck/TcPat.lhs
@@ -965,32 +965,6 @@ Meanwhile, the strategy is:
%* *
%************************************************************************
-{- This was used to improve the error message from
- an existential escape. Need to think how to do this.
-
-sigPatCtxt :: [LPat Var] -> [Var] -> [TcType] -> TcType -> TidyEnv
- -> TcM (TidyEnv, SDoc)
-sigPatCtxt pats bound_tvs pat_tys body_ty tidy_env
- = do { pat_tys' <- mapM zonkTcType pat_tys
- ; body_ty' <- zonkTcType body_ty
- ; let (env1, tidy_tys) = tidyOpenTypes tidy_env (map idType show_ids)
- (env2, tidy_pat_tys) = tidyOpenTypes env1 pat_tys'
- (env3, tidy_body_ty) = tidyOpenType env2 body_ty'
- ; return (env3,
- sep [ptext (sLit "When checking an existential match that binds"),
- nest 2 (vcat (zipWith ppr_id show_ids tidy_tys)),
- ptext (sLit "The pattern(s) have type(s):") <+> vcat (map ppr tidy_pat_tys),
- ptext (sLit "The body has type:") <+> ppr tidy_body_ty
- ]) }
- where
- bound_ids = collectPatsBinders pats
- show_ids = filter is_interesting bound_ids
- is_interesting id = any (`elemVarSet` varTypeTyVars id) bound_tvs
-
- ppr_id id ty = ppr id <+> dcolon <+> ppr ty
- -- Don't zonk the types so we get the separate, un-unified versions
--}
-
\begin{code}
maybeWrapPatCtxt :: Pat Name -> (TcM a -> TcM b) -> TcM a -> TcM b
-- Not all patterns are worth pushing a context