[Haskell-beginners] haskell error message

Daniel Fischer daniel.is.fischer at googlemail.com
Mon Aug 29 15:49:14 CEST 2011


On Monday 29 August 2011, 15:31:09, Ozgur Akgun wrote:
> On 29 August 2011 14:20, Daniel Fischer 
<daniel.is.fischer at googlemail.com>wrote:
> > Try a larger value or use the sledgehammer method and turn off the
> > limit: -fno-spec-constr-count
> 
> Yes I tried this and it removes the warnings.
> 
> Strangest thing is, when I set -f-spec-constr-count to 10, the generated
> warning is "... has four call patterns, but the limit is 3 ...". Somehow
> it doesn't say the limit is 10.

Second generation.

You have a function with three call patterns (and no previous constructor 
specialisation), limit is 10, fine, specialise.

This function calls a worker. Now, since we had three specialisations 
above, the limit here is 10 `div` 3 = 3. 
The worker would have four call patterns; 
4 > 3 => message "Hi there, I could have done more, but the limit said I 
shouldn't. You might want to set a higher limit if you think it's 
worthwhile to specialise."

Cheers,
Daniel



More information about the Beginners mailing list