Confusing warnings from GHC HEAD

Simon Peyton-Jones simonpj at microsoft.com
Tue Aug 31 05:06:52 EDT 2010


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-bounces at haskell.org [mailto:glasgow-haskell-users-bounces at haskell.org] On Behalf Of Bryan O'Sullivan
Sent: 29 August 2010 01:05
To: glasgow-haskell-users at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20100831/d4d3fa44/attachment-0001.html


More information about the Glasgow-haskell-users mailing list