| Standard ML Basis Library |
functor PrimIO(structure Vector : MONO_VECTOR
structure Array :
MONO_ARRAY
where type vector = Vector.vector where type elem = Vector.elem
structure VectorSlice :
MONO_VECTOR_SLICE
where type vector = Vector.vector where type elem = Vector.elem
structure ArraySlice :
MONO_ARRAY_SLICE
where type elem = Vector.elem
where type array = Array.array
where type vector = Vector.vector
where type vector_slice = VectorSlice.slice
eqtype pos
val someElem : Vector.elem
val compare : pos * pos -> order) : PRIM_IO =
struct
structure A = Array
structure AS = ArraySlice
structure V = Vector
structure VS = VectorSlice
type elem = A.elem
type vector = V.vector
type array = A.array
type pos = pos
datatype reader =
RD of
{
name : string,
chunkSize : int,
readVec : (int -> vector) option,
readArr : ({buf : array, i : int, sz : int option} -> int) option,
readVecNB : (int -> vector option) option,
readArrNB :
({buf : array, i : int, sz : int option} -> int option) option,
block : (unit -> unit) option,
canInput : (unit -> bool) option,
avail : unit -> int option,
getPos : (unit -> pos) option,
setPos : (pos -> unit) option,
endPos : (unit -> pos) option,
verifyPos : (unit -> pos) option,
close : unit -> unit,
ioDesc : OS.IO.iodesc option
}
datatype writer =
WR of
{
name : string,
chunkSize : int,
writeVec : ({buf : vector, i : int, sz : int option} -> int) option,
writeArr : ({buf : array, i : int, sz : int option} -> int) option,
writeVecNB :
({buf : vector, i : int, sz : int option} -> int option) option,
writeArrNB :
({buf : array, i : int, sz : int option} -> int option) option,
block : (unit -> unit) option,
canOutput : (unit -> bool) option,
getPos : (unit -> pos) option,
setPos : (pos -> unit) option,
endPos : (unit -> pos) option,
verifyPos : (unit -> pos) option,
close : unit -> unit,
ioDesc : OS.IO.iodesc option
}
val compare : pos * pos -> order
val blockingOperation
val nonblockingOperation
val augmentReader : reader -> reader
val augmentWriter : writer -> writer
end
Type detail |
---|
type elem = A.elem
type vector = V.vector
type array = A.array
type pos = pos
Datatype detail |
---|
datatype reader =
RD of
{
name : string,
chunkSize : int,
readVec : (int -> vector) option,
readArr : ({buf : array, i : int, sz : int option} -> int) option,
readVecNB : (int -> vector option) option,
readArrNB :
({buf : array, i : int, sz : int option} -> int option) option,
block : (unit -> unit) option,
canInput : (unit -> bool) option,
avail : unit -> int option,
getPos : (unit -> pos) option,
setPos : (pos -> unit) option,
endPos : (unit -> pos) option,
verifyPos : (unit -> pos) option,
close : unit -> unit,
ioDesc : OS.IO.iodesc option
}
datatype writer =
WR of
{
name : string,
chunkSize : int,
writeVec : ({buf : vector, i : int, sz : int option} -> int) option,
writeArr : ({buf : array, i : int, sz : int option} -> int) option,
writeVecNB :
({buf : vector, i : int, sz : int option} -> int option) option,
writeArrNB :
({buf : array, i : int, sz : int option} -> int option) option,
block : (unit -> unit) option,
canOutput : (unit -> bool) option,
getPos : (unit -> pos) option,
setPos : (pos -> unit) option,
endPos : (unit -> pos) option,
verifyPos : (unit -> pos) option,
close : unit -> unit,
ioDesc : OS.IO.iodesc option
}
DataConstructor detail |
---|
constructor RD
: {
name : string,
chunkSize : int,
readVec : (int -> vector) option,
readArr :
({buf : array, i : int, sz : int option} -> int) option,
readVecNB : (int -> vector option) option,
readArrNB :
({buf : array, i : int, sz : int option} -> int option) option,
block : (unit -> unit) option,
canInput : (unit -> bool) option,
avail : unit -> int option,
getPos : (unit -> pos) option,
setPos : (pos -> unit) option,
endPos : (unit -> pos) option,
verifyPos : (unit -> pos) option,
close : unit -> unit,
ioDesc : OS.IO.iodesc option
} ->
reader
constructor WR
: {
name : string,
chunkSize : int,
writeVec :
({buf : vector, i : int, sz : int option} -> int) option,
writeArr :
({buf : array, i : int, sz : int option} -> int) option,
writeVecNB :
({buf : vector, i : int, sz : int option} -> int option) option,
writeArrNB :
({buf : array, i : int, sz : int option} -> int option) option,
block : (unit -> unit) option,
canOutput : (unit -> bool) option,
getPos : (unit -> pos) option,
setPos : (pos -> unit) option,
endPos : (unit -> pos) option,
verifyPos : (unit -> pos) option,
close : unit -> unit,
ioDesc : OS.IO.iodesc option
} ->
writer
Value detail |
---|
val compare : pos * pos -> order
val blockingOperation
val nonblockingOperation
val augmentReader : reader -> reader
val augmentWriter : writer -> writer
| Standard ML Basis Library |
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). |