I can’t reproduce this.  With the enclosed module and HEAD, I get the warning; 
but when I add –fspec-constr-count=5, the warning goes away and I get the 
specialised rules.

Could Cabal not be passing on the flag or something?

Simon


module Foo where

data T = A | B | C | D | E

f :: T -> [Bool] -> T
f x ys | and ys = x
f A ys = f B ys
f B ys = f C ys
f C ys = f D ys
f D ys = f E ys
f E ys = f A ys


From: glasgow-haskell-users-boun...@haskell.org 
[mailto:glasgow-haskell-users-boun...@haskell.org] On Behalf Of Bryan O'Sullivan
Sent: 29 August 2010 01:05
To: glasgow-haskell-users@haskell.org
Subject: Confusing warnings from GHC HEAD

I get a few dozen of these when building the text package, and they weren't 
present in 6.12 or earlier:

SpecConstr
    Function `$wa1{v X5A2} [lid]'
      has three call patterns, but the limit is 2
    Use -fspec-constr-count=n to set the bound
    Use -dppr-debug to see specialisations

There are a few aspects to this that I find surprising.

  *   I can't do anything with the Core name.
  *   My cabal file contains -fspec-constr-count=5 just to be safe, but it 
doesn't help.
I can't tell whether this is the compiler going a little off into the weeds, or 
whether I'm doing something wrong, but I appear to be unable to make the 
message go away.

Thanks,
Bryan.
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to