[Haskell-cafe] SpecConstr message while compiling

Daniel Díaz Casanueva dhelta.diaz at gmail.com
Sun Oct 23 19:33:55 CEST 2011


Hi, cafe!

I wrote a program and had the following message while compiling (with -O2):

SpecConstr
    Function `addOc{v s6RL} [lid]'
      has four call patterns, but the limit is 3
    Use -fspec-constr-count=n to set the bound
    Use -dppr-debug to see specialisations

What it means? Is it bad? It only happens when compiling with -O2.

addOc is a local function (defined in a where clause). If it helps, here is
the definition:

addOc x [] = [(x,1)]
addOc x ((y,n):ys) = if x == y then (y,n+1) : ys
                               else (y,n) : addOc x ys

I want to know if there is something wrong or a I don't need to take care
about this.

Thanks in advance,
Daniel Díaz.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20111023/08510487/attachment.htm>


More information about the Haskell-Cafe mailing list