Haskell-ites,

Thanks to everyone who helped me out with the numeric-input query.

The main purpose of the query was to point up what I think is a serious
weakness of Haskell: the Prelude is still too complicated.  Any time I have to
go near the numeric class hierarchy, or the read package, I have the
heebie-jeebies, and I am by no means a casual Haskell programmer.

As a Haskell user, I would ask that the simplification of the prelude be
seriously considered in any future revisions of the language.  Consider the
following points.

1) My colleagues were surprised that Haskell did not parse floating-point
numbers properly; in fact, Haskell 1.3 does but not Haskell 1.2.  However, GHC
and Hugs retain the Haskell 1.2 behaviour.

Would this have happened if Haskell provided a small and simple collection of
input routines?

2) Where is the correct behaviour of `read', `reads', etc., documented?  If it
isn't documented, is this because it would take up too much room?

3) I considered writing a simple `atof' function from first principles but
quickly abandoned the idea, it being too much work to extricate myself from the
class-hierarchy tar pit to achieve simple conversions between integral and
floating-point types.

So how about turfing the read package and the numeric class hierarchy into the
standard libraries, replacing them with a small core of classes, types and
functions that could be properly documented.  The read package could be
converted into a complete Haskell parsing utility in the process.

Chris Dornan                    [EMAIL PROTECTED]
University College Cork         +353 21 902837



Reply via email to