diff options
author | Ian Lynagh <igloo@earth.li> | 2010-01-18 14:20:20 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2010-01-18 14:20:20 +0000 |
commit | 7804af8c4a5bc02798423900a641a4aa77e5abfb (patch) | |
tree | 93d27def70773fe8b25e6d31d39f121fdbafe543 /compiler | |
parent | fa306a37eaae1020f4cbd6cbed04847db6c23273 (diff) | |
download | haskell-7804af8c4a5bc02798423900a641a4aa77e5abfb.tar.gz |
Fix a warning message
We were printing the wrong value, so getting confusing messages like:
Function `$wa{v s17LO} [lid]'
has 2 call pattterns, but the limit is 3
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/specialise/SpecConstr.lhs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/specialise/SpecConstr.lhs b/compiler/specialise/SpecConstr.lhs index e3dc1b0d4b..222bcd1886 100644 --- a/compiler/specialise/SpecConstr.lhs +++ b/compiler/specialise/SpecConstr.lhs @@ -1107,15 +1107,14 @@ specialise env force_spec bind_calls (fn, arg_bndrs, body, arg_occs) -- Bale out if too many specialisations -- Rather a hacky way to do so, but it'll do for now - ; let n_pats = length pats - spec_count' = length pats + spec_count + ; let spec_count' = length pats + spec_count ; case sc_count env of Just max | not force_spec && spec_count' > max -> pprTrace "SpecConstr" msg $ return (nullUsage, spec_info) where msg = vcat [ sep [ ptext (sLit "Function") <+> quotes (ppr fn) - , nest 2 (ptext (sLit "has") <+> int n_pats <+> + , nest 2 (ptext (sLit "has") <+> int spec_count' <+> ptext (sLit "call patterns, but the limit is") <+> int max) ] , ptext (sLit "Use -fspec-constr-count=n to set the bound") , extra ] |