The following is a summary of the changes made to the SML Basis Library specification. The changes are listed with the most recent first. This list only covers actual changes or clarifications to the specification; it does not cover changes to the prose or layout.
Added fromNanoseconds
and toNanoseconds
to the Time
structure.
inputLine
function in both TEXT_IO
and TEXT_STREAM_IO
.
unit
.
PRIM_IO
design (this change also avoids a nasty portablility problem).
realRound
to the REAL
signature.
Byte
, PRIM_IO
, PrimIO
, Socket
, and Posix.IO
Posix.IO.readVec
raises Size
with a negative argument, rather than Subscript
.
setBufferMode
does not permit flushing when switching between LINE_BUF
and BLOCK_BUF
.
ref
to live in General
recvVec*
raise Size
with a negative second argument, rather than Subscript
.
CharVectorSlice
and CharArraySlice
to TEXT
.
ImperativeIO
and StreamIO
.
Changed the names of the PACK_WORD
instances to PackWord<N>Big
and PackWord<N>Little
.
WordVector
WordVectorSlice
, WordArray
, WordArraySlice
, WordArray2
, LargeIntVector
LargeIntVectorSlice
, LargeIntArray
, LargeIntArraySlice
, LargeIntArray2
, LargeWordVector
LargeWordVectorSlice
, LargeWordArray
, LargeWordArraySlice
, LargeWordArray2
, LargeRealVector
LargeRealVectorSlice
, LargeRealArray
, LargeRealArraySlice
, and LargeRealArray2
.
Time.toSeconds
, etc. round towards 0.
IO.ClosedStream
exception. First, we note that this exception should be used if the output stream is terminated. (If we want to distinguish the cases, we could resurrect the TerminatedStream
exception.) Second, we removed the requirement that the IO.ClosedStream
be reported by the writer. Since we require that output on closed streams generate IO.ClosedStream
, if we want the writer to do this, the StreamIO.output function would be forced to do a write, or check somehow with the writer to see if it is closed. This is not reasonable. This still leaves open the case that the writer is closed without using the StreamIO.outstream, so the exception only occurs when the stream is flushed. But it is also possible to close the file descriptor without telling the writer.
Time
. The Time
exception should be raised, not Overflow
, if a time value cannot be represented.
Subscript
exceptions for Windows.Reg.enumKeyEx
and Windows.Reg.enumValueEx
.
~
is overloaded for Word.word
.
Substring
.all
, leaving Substring.full
.
WORD.toLarge
, WORD.toLargeX
and WORD.fromLarge
to the WORD
signature as synonyms for WORD.toLargeWord
, WORD.toLargeWordX
and WORD.fromLargeWord
, and deprecate the latter. This is to be consistent with reals and ints.
Time.fmt
to raise exception on negative precisions, to be consistent with Real.fmt
.
OS.FileSys.A_EXEC
should be ignored by OS.FileSys.access
on systems that have no notion of execute permission.
Socket
structure. Specifically, what exceptions get raised when and how closed connections are detected.
Word8Array2
from the required structure list in the HTML version.
Posix.IO.readVec
raises Subscript
if the integer argument is negative.
use
function is optional.
StringCvt.FIX
when 0
precision is specified.
TextIO
as these are part of the TEXT_STREAM_IO
signature.
Error.errorName
and Error.syserror
.
BinIO
.
OS.FileSys.tmpName
to avoid a race condition.
platformWin32Window2000
and platformWin32WindowsXP
, and added platformWin32CE
to Windows.Config
. Dave Matthews pointed out that the first 2 are identical to platformWin32NT
and can't be used to identify a platform. The last reflects the CE system documented by Microsoft.
Socket.sock_desc
with operations sockDesc
, sameDesc
, and select
. We also replaced the Socket.pollDesc
function with ioDesc
. These changes were proposed in 1998 and agreed upon, but somehow never made it into the document before now.
Unix
module.
iodesc
values not covered by OS.IO.Kind
.
SysWord
module may be provided by an implementation even when the Posix
structure is not provided.
Windows.executeWithNullStreams
.
Windows.DDE.executeString
so that the delay is a Time.time
.
Posix.FileSys.pathconf
and Posix.FileSys.fpathconf
so that a return value of false is represented by SOME
0
rather than NONE
.
getpgrp
and setpgrp
functions in Posix.TTY
into the substructure Posix.TTY.TC
for consistency.
OS.Path.toUnixPath
.
Posix.FileSys.pathconf
function to be more specific.
Windows
structure to reflect the most recent proposals by Dave Matthews and Dave Berry.
TerminatedStream
exception from the IO
module, since the operation that uses it (setPosIn
) was removed previously (1998-10-05).
scan
type. The affected signatures are CHAR
, DATE
, IEEE_REAL
, INTEGER
, TIME
, WORD
.
Bool.scan
to be StringCvt.reader
(this is a cosmetic change).
OS.Process.sleep
.
map
and mapi
in the MONO_VECTOR_SLICE
signature.
scan
, fromString
and fromDecimal
in Real
structure to convert extreme values to 0
or infinity, instead of raising the Overflow
exception.
Time.time
to allow negative time values.
Date.date
to -23..23.
BIT_FLAGS.all
may contain more set bits than those defined in a matching structure.
all
in the SUBSTRING
signature, but depreciate its use.
BIT_FLAGS.clear
specification to return flags
.
Windows.Status.nocontinuableException
to noncontinuableException
.
BIT_FLAGS
.
OS.Process.sleep
.
option
modifier to return type of Real.fromDecimal
to reflect the possibility of an ill-formed argument.
Windows">Windows.executeWithNullStreams
(later removed).
List.collate
.
ListPair
module that require equal length arguments.
String.isSubstring
and Substring.isSubstring
.
VECTOR
and MONO_VECTOR
.
Char.fromCString
.
MONO_ARRAY2
signature (see 1998-07-21).
Real.scan
to accept "inf" and "nan".
Timer.checkCPUTimer
was changed to not include GC time. A new function Timer.checkGCTime
was added.
OS.Process.status
is no longer an equality type.
Unix.exit_status
.
Unix.proc
type is now a type constructor. The return types of Unix.execute
, Unix.executeInEnv
, Unix.streamsOf
, and Unix.reap
were changed accordingly.
textInstreamOf
, textOutstreamOf
, binInstreamOf
, and binOutstreamOf
were added to the Unix
structure.
Unix.exit
.
OS.Process.isSuccess
for testing OS.Process.status
values.
mkBinReader
, mkTextReader
, mkBinWriter
, and mkTextWriter
functions to the Posix.IO
structure.
Posix.Process.fromStatus
OS.FileSys.readDir
and Posix.FileSys.readdir
to return a string option
value instead of a string
.
STREAM_IO
signature: more specification of the relationships between inputAll
, inputN
, and input
; changed type of inputAll
and filePosIn
, and deleted getPosIn, setPosIn, and in_pos, as ratified at ICFP '98.
IMPERATIVE_IO
interface: deleted getPosIn, and setPosIn; added new material at end about semantics of operations and about random access.
Real.fromInt
and Real.fromLargeInt
in the case where the argument does not map exactly to a real value.
OS.Path.mkAbsolute
and OS.Path.mkRelative
have been changed to take record arguments, instead of pairs.
The question about when to include substructures versus when to include types has been resolved. We are adopting the convention of favoring types over substructures, which results in the following changes:
signature STRING
char
.
signature SUBSTRING
char
and string
.
signature MONO_ARRAY
vector
.
signature MONO_ARRAY2
vector
.
Text
: TEXT
), that collect together text related structures.
There were many minor changes to the text and formatting. In addition, the following changes to the specification were made:
region
type in the MONO_ARRAY2
signature.
CommandLine.arguments
function.
IEEE_REAL.float_class
type, and eliminated the nan_mode type.
OS.IO.poll
: the resulting list must respect the order of the argument list.
fromWord
.
Char.toCString
: always use three octal digits in escape sequences.
The SML Basis Library specification was re-released on the web. We do not have a list of changes prior to this release.
Generated October 02, 2003
Last Modified July 9, 2002
Comments to John Reppy.
This document may be distributed freely over the internet as long as the copyright notice and license terms below are prominently displayed within every machine-readable copy.
Copyright © 2003 AT&T and Lucent Technologies. All rights reserved.
Permission is granted for internet users to make one paper copy for their
own personal use. Further hardcopy reproduction is strictly prohibited.
Permission to distribute the HTML document electronically on any medium
other than the internet must be requested from the copyright holders by
contacting the editors.
Printed versions of the SML Basis Manual are available from Cambridge
University Press.
To order, please visit
www.cup.org (North America) or
www.cup.cam.ac.uk (outside North America). |