On Thu, Apr 1, 2010 at 5:27 AM, Jens Blanck <[email protected]> wrote: > I was wondering if someone could give me some references to when and why the > choice was made to default integral numerical literals to Integer rather > than to Int in Haskell. Also, if you are aware of similar discussions in > other languages. > I'd like to use this information to make an analogous case for defaulting > real numerical literals (well, the literals are likely to be in scientific > notation, i.e., floating point) to some data type of computable reals rather > than to floating point Double.
Integer (and Rational) have decidable equality testing. I don't think the same can be said for computable reals. (Does pi == pi? How about 2 * asin 1?) -- Dave Menendez <[email protected]> <http://www.eyrie.org/~zednenem/> _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
