[Haskell-beginners] Question on Real World Haskell ch.13 SymbolicManip
Brandon Allbery
allbery.b at gmail.com
Wed Jun 1 03:34:41 CEST 2011
>> 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.
More information about the Beginners
mailing list