[replying to haskell-cafe]
On 9/15/07, Norman Ramsey [EMAIL PROTECTED] wrote:
Dear Haskellers,
I've had a Haskell program rejected for reasons I don't understand.
Here's the relevant bit of code; the problem is that I expected the
type-inference engine to generalize the abbreviation 'fold'
Hi
Monomorphism restriction? Replacing fold with foldRegsUsed would work
because there's a type signature for foldRegsUsed.
That looks like it. Another solution would be:
fold = foldRegsUsed
becomes:
fold x = foldRegsUsed x
Now the monomorphism restriction doesn't kick in because fold