[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
More "errors" in PreludeText: NO SYNTAX!
Original-Via: uk.ac.nsf; Fri, 15 Mar 91 00:31:55 GMT
Date: Fri, 15 Mar 91 12:44:54 NZD
From: E.Ireland@massey.ac.nz
To: jhf@chaco.c3.lanl.gov
Cc: haskell@edu.yale.cs
In-Reply-To: Joe Fasel's message of Mon, 4 Mar 91 10:26:14 MST <9103041726.AA13012@chaco.c3.lanl.gov.>
Subject: More "errors" in PreludeText: NO SYNTAX!
Sender: haskell-request@cs.glasgow.ac.uk
Joe,
In addition to the remarks I made about errors in PreludeText, there are a
couple of other functions that might need touching up, namely readInt and
readFloating. If no character sequence is allowed to cause a run-time error on
parsing, then these functions must check for overflow conditions etc.
Otherwise our programs will still be prone to typing errors made by the user,
e.g.
2.32e5665626 ...
(Assume that we are parsing for a floating value followed by an integral value,
and that the user mistakenly typed an 'e' instead of a space. The current
readFloating function would probably cause an error condition or some undefined
behaviour).
_______________________________________________________________________________
E.Ireland@massey.ac.nz Evan Ireland, School of Information Sciences,
(063) 69-099 x8541 Massey University, Palmerston North, New Zealand.