projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c36a2f9
)
[project @ 2005-02-04 17:36:47 by simonpj]
author
simonpj
<unknown>
Fri, 4 Feb 2005 17:36:47 +0000
(17:36 +0000)
committer
simonpj
<unknown>
Fri, 4 Feb 2005 17:36:47 +0000
(17:36 +0000)
Wibble to message
ghc/compiler/typecheck/TcSimplify.lhs
patch
|
blob
|
history
diff --git
a/ghc/compiler/typecheck/TcSimplify.lhs
b/ghc/compiler/typecheck/TcSimplify.lhs
index
5c0a22d
..
cf22d42
100644
(file)
--- a/
ghc/compiler/typecheck/TcSimplify.lhs
+++ b/
ghc/compiler/typecheck/TcSimplify.lhs
@@
-2289,7
+2289,7
@@
addTopIPErrs bndrs ips
mk_msg ips = vcat [sep [ptext SLIT("Implicit parameters escape from the monomorphic top-level binding(s) of"),
pprBinders bndrs <> colon],
nest 2 (vcat (map ppr_ip ips)),
mk_msg ips = vcat [sep [ptext SLIT("Implicit parameters escape from the monomorphic top-level binding(s) of"),
pprBinders bndrs <> colon],
nest 2 (vcat (map ppr_ip ips)),
- ptext SLIT("Probably fix: add type signatures for the top-level binding(s)")]
+ monomorphism_fix]
ppr_ip ip = pprPred (dictPred ip) <+> pprInstLoc (instLoc ip)
strangeTopIPErrs :: [Inst] -> TcM ()
ppr_ip ip = pprPred (dictPred ip) <+> pprInstLoc (instLoc ip)
strangeTopIPErrs :: [Inst] -> TcM ()
@@
-2427,7
+2427,12
@@
mkMonomorphismMsg tidy_env inst_tvs
-- whre monomorphism doesn't play any role
mk_msg docs = vcat [ptext SLIT("Possible cause: the monomorphism restriction applied to the following:"),
nest 2 (vcat docs),
-- whre monomorphism doesn't play any role
mk_msg docs = vcat [ptext SLIT("Possible cause: the monomorphism restriction applied to the following:"),
nest 2 (vcat docs),
- ptext SLIT("Probable fix: give these definition(s) an explicit type signature")]
+ monomorphism_fix
+ ]
+monomorphism_fix :: SDoc
+monomorphism_fix = ptext SLIT("Probable fix:") <+>
+ (ptext SLIT("give these definition(s) an explicit type signature")
+ $$ ptext SLIT("or use -fno-monomorphism-restriction"))
warnDefault dicts default_ty
= doptM Opt_WarnTypeDefaults `thenM` \ warn_flag ->
warnDefault dicts default_ty
= doptM Opt_WarnTypeDefaults `thenM` \ warn_flag ->