Overview  Index  Help 
Standard ML Basis Library

PrimIO


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 -> vectoroption,
             readArr : ({buf : array, i : int, sz : int option} -> intoption,
             readVecNB : (int -> vector optionoption,
             readArrNB :
             ({buf : array, i : int, sz : int option} -> int optionoption,
             block : (unit -> unitoption,
             canInput : (unit -> bool) option,
             avail : unit -> int option,
             getPos : (unit -> posoption,
             setPos : (pos -> unitoption,
             endPos : (unit -> posoption,
             verifyPos : (unit -> posoption,
             close : unit -> unit,
             ioDesc : OS.IO.iodesc option
           }
  datatype writer =
           WR of
           {
             name : string,
             chunkSize : int,
             writeVec : ({buf : vector, i : int, sz : int option} -> intoption,
             writeArr : ({buf : array, i : int, sz : int option} -> intoption,
             writeVecNB :
             ({buf : vector, i : int, sz : int option} -> int optionoption,
             writeArrNB :
             ({buf : array, i : int, sz : int option} -> int optionoption,
             block : (unit -> unitoption,
             canOutput : (unit -> bool) option,
             getPos : (unit -> posoption,
             setPos : (pos -> unitoption,
             endPos : (unit -> posoption,
             verifyPos : (unit -> posoption,
             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

elem

type elem = A.elem


vector

type vector = V.vector


array

type array = A.array


pos

type pos = pos

 
Datatype detail

reader

datatype reader =
         RD of
         {
           name : string,
           chunkSize : int,
           readVec : (int -> vectoroption,
           readArr : ({buf : array, i : int, sz : int option} -> intoption,
           readVecNB : (int -> vector optionoption,
           readArrNB :
           ({buf : array, i : int, sz : int option} -> int optionoption,
           block : (unit -> unitoption,
           canInput : (unit -> bool) option,
           avail : unit -> int option,
           getPos : (unit -> posoption,
           setPos : (pos -> unitoption,
           endPos : (unit -> posoption,
           verifyPos : (unit -> posoption,
           close : unit -> unit,
           ioDesc : OS.IO.iodesc option
         }


writer

datatype writer =
         WR of
         {
           name : string,
           chunkSize : int,
           writeVec : ({buf : vector, i : int, sz : int option} -> intoption,
           writeArr : ({buf : array, i : int, sz : int option} -> intoption,
           writeVecNB :
           ({buf : vector, i : int, sz : int option} -> int optionoption,
           writeArrNB :
           ({buf : array, i : int, sz : int option} -> int optionoption,
           block : (unit -> unitoption,
           canOutput : (unit -> bool) option,
           getPos : (unit -> posoption,
           setPos : (pos -> unitoption,
           endPos : (unit -> posoption,
           verifyPos : (unit -> posoption,
           close : unit -> unit,
           ioDesc : OS.IO.iodesc option
         }

 
DataConstructor detail

RD

constructor RD
            : {
                name : string,
                chunkSize : int,
                readVec : (int -> vectoroption,
                readArr :
                ({buf : array, i : int, sz : int option} -> intoption,
                readVecNB : (int -> vector optionoption,
                readArrNB :
                ({buf : array, i : int, sz : int option} -> int optionoption,
                block : (unit -> unitoption,
                canInput : (unit -> bool) option,
                avail : unit -> int option,
                getPos : (unit -> posoption,
                setPos : (pos -> unitoption,
                endPos : (unit -> posoption,
                verifyPos : (unit -> posoption,
                close : unit -> unit,
                ioDesc : OS.IO.iodesc option
              } ->
                reader


WR

constructor WR
            : {
                name : string,
                chunkSize : int,
                writeVec :
                ({buf : vector, i : int, sz : int option} -> intoption,
                writeArr :
                ({buf : array, i : int, sz : int option} -> intoption,
                writeVecNB :
                ({buf : vector, i : int, sz : int option} -> int optionoption,
                writeArrNB :
                ({buf : array, i : int, sz : int option} -> int optionoption,
                block : (unit -> unitoption,
                canOutput : (unit -> bool) option,
                getPos : (unit -> posoption,
                setPos : (pos -> unitoption,
                endPos : (unit -> posoption,
                verifyPos : (unit -> posoption,
                close : unit -> unit,
                ioDesc : OS.IO.iodesc option
              } ->
                writer

 
Value detail

compare

val compare : pos * pos -> order


blockingOperation

val blockingOperation


nonblockingOperation

val nonblockingOperation


augmentReader

val augmentReader : reader -> reader


augmentWriter

val augmentWriter : writer -> writer

 


Overview  Index  Help 
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).