rnTopMonoBinds mbinds sigs
- = mapRn lookupBndrRn binder_rdr_names `thenRn` \ binder_names ->
+ = mapRn lookupBndrRn binder_rdr_names `thenRn` \ binder_names ->
+ bindPatSigTyVars (collectSigTysFromMonoBinds mbinds) $
let
bndr_name_set = mkNameSet binder_names
in
else let
(tidy_env', tidy_ty) = tidyOpenType tidy_env id_ty
msg = sep [ppr id <+> dcolon <+> ppr tidy_ty,
- nest 2 (sep [quotes (ppr id) <+> ptext SLIT("is bound at"),
- ptext SLIT("at") <+> ppr (getSrcLoc id)])]
+ nest 2 (parens (ptext SLIT("bound at") <+>
+ ppr (getSrcLoc id)))]
in
returnNF_Tc (tidy_env', Just msg)
bound_at | isMutTyVar tv = mut_info -- The expected case
| 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)]
in
returnNF_Tc (tidy_env2, Just msg)
escape_msg sig_tv tv globs frees
= mk_msg sig_tv <+> ptext SLIT("escapes") $$
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
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"))