Home My Page Projects Code Snippets Project Openings SML/NJ Bugs
Summary Activity Tracker Lists

[#136] Incorrect raising of exceptions in Real.fmt and Time.fmt

Date:
2015-08-22 11:16
Priority:
3
State:
Closed
Submitted by:
Bug Submitter (webuser)
Assigned to:
John Reppy (jhr)
Machine Architecture:
None
Operating System:
All
Component:
Basis Library
Resolution:
Fixed
Severity:
Minor
OS Version:
any
SML/NJ Version:
110.78
Keywords:
exceptions
URL:
Transcript (of reproduction):
<jhr@aeneas> sml Standard ML of New Jersey v110.78 [built: Sun Dec 21 16:30:08 2014] - Real.fmt (StringCvt.FIX(SOME ~1)); [autoloading] [library $SMLNJ-BASIS/basis.cm is stable] [autoloading done] val it = fn : real -> string - it 1.0; uncaught exception Size [size] raised at: Basis/Implementation/real-format.sml:124.33-124.45 - Time.fmt ~1; [autoloading] [autoloading done] val it = fn : Time.time -> string - it (Time.now()); uncaught exception Size [size] raised at: Basis/Implementation/time.sml:72.25-72.37 -
Source (for reproduction):
Real.fmt (StringCvt.FIX(SOME ~1)); (* should raise Size *) Time.fmt ~1; (* should raise Size *)
Summary:
Incorrect raising of exceptions in Real.fmt and Time.fmt

Detailed description
The SML/NJ implementation of Real.fmt and Time.fmt do not agree
with the semantics specified in the Basis Library implementation.
Specifically, they should raise the Size exception on partial
application to a incorrect first argument, instead of waiting
for the second argument.
Additional comments:
The Basis Library specification is a bit imprecise
about Time.fmt, but it should have the same behavior
as Real.fmt.

Submitted via web form by John Reppy <jhr@cs.uchicago.edu>

Comments:

Message  ↓
Date: 2015-08-22 13:08
Sender: John Reppy

Fixed for 110.79.

Attached Files:

Changes

Field Old Value Date By
status_idOpen2015-08-22 13:08jhr
close_dateNone2015-08-22 13:08jhr
ResolutionNone2015-08-22 13:08jhr
assigned_tonone2015-08-22 11:49jhr
detailsThe SML/NJ implementation of Real.fmt and Time.fmt do not agree with the semantics specified in the Basis Library implementation. Specifically, they should raise the Size exception on partial application to a incorrect first argument, instead of waiting for the second argument. Additional comments: The Basis Library specification is a bit imprecise about Time.fmt, but it should have the same behavior as Real.fmt. Submitted via web form by John Reppy <jhr@cs.uchicago.edu> 2015-08-22 11:49jhr
Operating SystemGeneric Unix2015-08-22 11:49jhr
Transcript (of reproduction)<jhr@aeneas> sml Standard ML of New Jersey v110.78 [built: Sun Dec 21 16:30:08 2014] - Real.fmt (StringCvt.FIX(SOME ~1)); [autoloading] [library $SMLNJ-BASIS/basis.cm is stable] [autoloading done] val it = fn : real -> string - it 1.0; uncaught exception Size [size] raised at: Basis/Implementation/real-format.sml:124.33-124.45 - Time.fmt ~1; [autoloading] [autoloading done] val it = fn : Time.time -> string - it (Time.now()); uncaught exception Size [size] raised at: Basis/Implementation/time.sml:72.25-72.37 - 2015-08-22 11:49jhr
Source (for reproduction)Real.fmt (StringCvt.FIX(SOME ~1)); (* should raise Size *) Time.fmt ~1; (* should raise Size *) 2015-08-22 11:49jhr