diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2011-05-26 17:21:51 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2011-05-26 17:21:51 +0100 |
commit | 3664c198bbf23acce9820104c06878aa78a32a39 (patch) | |
tree | fda265034874d83963b9f75dcb2cbbb957a2485a /compiler/specialise | |
parent | 3afdf90d0f9fb18f13a6b76fe41e5fc60bbdaac3 (diff) | |
download | haskell-3664c198bbf23acce9820104c06878aa78a32a39.tar.gz |
Suppress the alarming SpecConstr message for normal users (Trac #5125)
This is the offending message:
SpecConstr
Function `$wks2{v s2dJ} [lid]'
has one call pattern, but the limit is 0
Use -fspec-constr-count=n to set the bound
Use -dppr-debug to see specialisations
The message isn't very good, and is for experts only. So now it
comes out only
if you build with -DDEBUG
or you specify -dppr-debug at runtime
Diffstat (limited to 'compiler/specialise')
-rw-r--r-- | compiler/specialise/SpecConstr.lhs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/specialise/SpecConstr.lhs b/compiler/specialise/SpecConstr.lhs index 5fc0226941..6cc05a3dc6 100644 --- a/compiler/specialise/SpecConstr.lhs +++ b/compiler/specialise/SpecConstr.lhs @@ -1313,8 +1313,10 @@ specialise env bind_calls (RI fn _ arg_bndrs body arg_occs) spec_count' = n_pats + spec_count ; case sc_count env of Just max | not (sc_force env) && spec_count' > max - -> pprTrace "SpecConstr" msg $ - return (nullUsage, spec_info) + -> if (debugIsOn || opt_PprStyle_Debug) -- Suppress this scary message for + then pprTrace "SpecConstr" msg $ -- ordinary users! Trac #5125 + return (nullUsage, spec_info) + else return (nullUsage, spec_info) where msg = vcat [ sep [ ptext (sLit "Function") <+> quotes (ppr fn) , nest 2 (ptext (sLit "has") <+> |