Confusing warnings from GHC HEAD

Bryan O'Sullivan bos at
Sat Sep 4 23:12:15 EDT 2010

On Tue, Aug 31, 2010 at 2:06 AM, Simon Peyton-Jones
<simonpj at>wrote:

>  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.

The compiler behaves as expected on your code, but not on mine. I've
verified that the -fspec-constr-count argument is indeed being passed along
by Cabal to ghc.

In my case, building with -fspec-constr-count=10 eliminates the warnings on
most of the functions where the Core name corresponds to something I can see
in the source, so almost half the SpecConstr warnings go away.

So, for instance, this one goes away when I increase the count:

    Function `$wconsume{v s1RPo} [lid]'
      has five call patterns, but the limit is 3

However, several warnings remain, and the Core names are unidentifiable.
More strangely, the SpecConstr limit reported in the warnings changes from
one warning to the next, even within the sequence of warnings emitted during
the compilation of a single file. Here's an excerpt from compiling only

    Function `$wa1{v Xvnq} [lid]'
      has one call pattern, but the limit is 0

    Function `$w$j{v Xvob} [lid]'
      has two call patterns, but the limit is 1

    Function `$wa1{v Xvov} [lid]'
      has three call patterns, but the limit is 2

This suggests to me that maybe some config information is being changed in
error somewhere?
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Glasgow-haskell-users mailing list