Commit | Line | Data |
---|---|---|
7f918cf1 CE |
1 | signature TEXT_IO_GLOBAL = |
2 | sig | |
3 | val print: string -> unit | |
4 | end | |
5 | ||
6 | signature TEXT_IO = | |
7 | sig | |
8 | include TEXT_IO_GLOBAL | |
9 | ||
10 | structure StreamIO: TEXT_STREAM_IO | |
11 | (* where type elem = Char.char *) (* redundant *) | |
12 | where type pos = TextPrimIO.pos | |
13 | where type reader = TextPrimIO.reader | |
14 | (* where type vector = CharVector.vector *) (* redundant *) | |
15 | where type writer = TextPrimIO.writer | |
16 | ||
17 | type elem = StreamIO.elem | |
18 | type instream | |
19 | type outstream | |
20 | type vector = StreamIO.vector | |
21 | ||
22 | val canInput: instream * int -> int option | |
23 | val closeIn: instream -> unit | |
24 | val closeOut: outstream -> unit | |
25 | val endOfStream: instream -> bool | |
26 | val flushOut: outstream -> unit | |
27 | val getInstream: instream -> StreamIO.instream | |
28 | val getOutstream: outstream -> StreamIO.outstream | |
29 | val getPosOut: outstream -> StreamIO.out_pos | |
30 | val input1: instream -> elem option | |
31 | val input: instream -> vector | |
32 | val inputAll: instream -> vector | |
33 | val inputLine: instream -> string option | |
34 | val inputN: instream * int -> vector | |
35 | val lookahead: instream -> elem option | |
36 | val mkInstream: StreamIO.instream -> instream | |
37 | val mkOutstream: StreamIO.outstream -> outstream | |
38 | val openAppend: string -> outstream | |
39 | val openIn: string -> instream | |
40 | val openOut: string -> outstream | |
41 | val openString: string -> instream | |
42 | val output1: outstream * elem -> unit | |
43 | val output: outstream * vector -> unit | |
44 | val outputSubstr: outstream * substring -> unit | |
45 | val scanStream: | |
46 | ((Char.char, StreamIO.instream) StringCvt.reader | |
47 | -> ('a, StreamIO.instream) StringCvt.reader) | |
48 | -> instream -> 'a option | |
49 | val setInstream: (instream * StreamIO.instream) -> unit | |
50 | val setOutstream: outstream * StreamIO.outstream -> unit | |
51 | val setPosOut: outstream * StreamIO.out_pos -> unit | |
52 | val stdErr: outstream | |
53 | val stdIn: instream | |
54 | val stdOut: outstream | |
55 | end | |
56 | ||
57 | signature TEXT_IO_EXTRA = | |
58 | sig | |
59 | include TEXT_IO | |
60 | ||
61 | val equalsIn: instream * instream -> bool | |
62 | val inFd: instream -> Posix.IO.file_desc | |
63 | val newIn: Posix.IO.file_desc * string -> instream | |
64 | val newOut: Posix.IO.file_desc * string -> outstream | |
65 | val outFd: outstream -> Posix.IO.file_desc | |
66 | end |