Commit 6aa013b4 authored by simonpj's avatar simonpj
Browse files

[project @ 2001-11-05 14:16:48 by simonpj]

Wibbles for scoped type variables
parent 01f2098b
...@@ -162,7 +162,8 @@ rnTopBinds (MonoBind bind sigs _) = rnTopMonoBinds bind sigs ...@@ -162,7 +162,8 @@ rnTopBinds (MonoBind bind sigs _) = rnTopMonoBinds bind sigs
rnTopMonoBinds mbinds sigs rnTopMonoBinds mbinds sigs
= mapRn lookupBndrRn binder_rdr_names `thenRn` \ binder_names -> = mapRn lookupBndrRn binder_rdr_names `thenRn` \ binder_names ->
bindPatSigTyVars (collectSigTysFromMonoBinds mbinds) $
let let
bndr_name_set = mkNameSet binder_names bndr_name_set = mkNameSet binder_names
in in
......
...@@ -767,8 +767,8 @@ find_thing ignore_it tidy_env (ATcId id) ...@@ -767,8 +767,8 @@ find_thing ignore_it tidy_env (ATcId id)
else let else let
(tidy_env', tidy_ty) = tidyOpenType tidy_env id_ty (tidy_env', tidy_ty) = tidyOpenType tidy_env id_ty
msg = sep [ppr id <+> dcolon <+> ppr tidy_ty, msg = sep [ppr id <+> dcolon <+> ppr tidy_ty,
nest 2 (sep [quotes (ppr id) <+> ptext SLIT("is bound at"), nest 2 (parens (ptext SLIT("bound at") <+>
ptext SLIT("at") <+> ppr (getSrcLoc id)])] ppr (getSrcLoc id)))]
in in
returnNF_Tc (tidy_env', Just msg) returnNF_Tc (tidy_env', Just msg)
...@@ -788,7 +788,7 @@ find_thing ignore_it tidy_env (ATyVar tv) ...@@ -788,7 +788,7 @@ find_thing ignore_it tidy_env (ATyVar tv)
bound_at | isMutTyVar tv = mut_info -- The expected case bound_at | isMutTyVar tv = mut_info -- The expected case
| otherwise = empty | otherwise = empty
mut_info = sep [ptext SLIT("is bound by") <+> ppr (mutTyVarDetails tv), mut_info = sep [ptext SLIT("is bound by the") <+> ppr (mutTyVarDetails tv),
ptext SLIT("at") <+> ppr (getSrcLoc tv)] ptext SLIT("at") <+> ppr (getSrcLoc tv)]
in in
returnNF_Tc (tidy_env2, Just msg) returnNF_Tc (tidy_env2, Just msg)
...@@ -810,7 +810,8 @@ find_frees tv tidy_env acc (ftv:ftvs) ...@@ -810,7 +810,8 @@ find_frees tv tidy_env acc (ftv:ftvs)
escape_msg sig_tv tv globs frees escape_msg sig_tv tv globs frees
= mk_msg sig_tv <+> ptext SLIT("escapes") $$ = mk_msg sig_tv <+> ptext SLIT("escapes") $$
if not (null globs) then if not (null globs) then
vcat [pp_it <+> ptext SLIT("is mentioned in the environment:"), vcat globs] vcat [pp_it <+> ptext SLIT("is mentioned in the environment:"),
nest 2 (vcat globs)]
else if not (null frees) then else if not (null frees) then
vcat [ptext SLIT("It is reachable from the type variable(s)") <+> pprQuotedList frees, vcat [ptext SLIT("It is reachable from the type variable(s)") <+> pprQuotedList frees,
nest 2 (ptext SLIT("which") <+> is_are <+> ptext SLIT("free in the signature")) nest 2 (ptext SLIT("which") <+> is_are <+> ptext SLIT("free in the signature"))
......
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