
11 Apr
2001
11 Apr
'01
1:12 a.m.
On 01-May-2001, Terrence Brannon
my question (primarily for Fergus) is: "has Ashley shown in her example a means of automating a toUnits imperative in Haskell that must be done explicitly in Mercury?"
Yes. In Haskell, there's some syntactic sugar attached to every numeric
literal: "123" is defined to mean "fromInteger 123", where "fromInteger"
is an overloaded (class member) function defined in the standard Prelude.
In Mercury, if you want "fromInteger" or "toUnit", then you need
to write it explicitly.
--
Fergus Henderson