
31 May
2011
31 May
'11
9:34 p.m.
It's not lazy evaluation; it's the combination of types and the automatic translation of literal values to calls to fromLiteral per the Haskell language definition. Since in this case, the type
I don't see fromLiteral in the language definition. Is it fromInteger that I should look at, maybe?
Yes; I seem to have been thinking one thing and typing another. The spec says that things that look like integer literals are wrapped in fromIntegral and that others are wrapped in fromRational; see http://www.haskell.org/onlinereport/basic.html#numeric-literals for the formal rules.