MetaCartSign in to MyCiteSeer

Include Citations | Advanced Search | Help

Include Citations | Advanced Search | Help

  Mistakes and Ambiguities in the Definition of Standard ML-- Addenda--

Download:
Download as a PDF | Download as a PS
by Stefan Kahrs
ftp://ftp.dcs.ed.ac.uk/pub/smk/SML/errors-new.ps.Z
Add To MetaCart

Abstract:

This paper lists errors in the definition of Standard ML [MTH90] that have been discovered since [Kah93] came out; it should be read together with that report. I also discuss some problems related to problem solutions suggested in [Kah93]. Page and rule numbers below refer to [MTH90] except where indicated. Errors discovered since the 29th June 1994 (the first version of this document) are especially indicated. Syntax for the Core The syntax of a layered pattern is defined as var as pat (if we leave out the optional parts). However, this suggests that the following is defined despite the use of a constructor as var: datatype t = A--- B val A as B = B Implementations usually reject this, because layered patterns are typically implemented as pat as pat to resolve a shift-reduce conflict in the grammar (see section 8.4 in [Kah93]); an exception is MLKit which indeed allows the above declaration. A justification for the restriction is the claim on page 5 that "no value declaration can make a hole in the scope of a value or exception constructor". The above declaration does just that.

Citations

1471 The Definition of Standard ML – Milner, Tofte, et al. - 1990
19 Mistakes and Ambiguities in the Definition of Standard ML – Kahrs - 1993
12 Andrzej Tarlecki. The definition of Extended ML – Kahrs, Sannella - 1994