Commit 7b6b26c8 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Remove dead code

parent 416beb80
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment