blob: 2f2c834412f1f903bee95d0cbff4f8dab79fa884 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
signature STREAM = sig
type fileId = int
type fileOffset = int
datatype pos = Pos of string * int * int
type t
exception EOF
val Ppos: (pos, 'a, 'b) a1printer
val getchar: t -> char option * t
(* Will throw UngetcError, if applied at the beginning of the stream.
* Can be always avoided, so is not provided in sig file *)
val ungetc: t -> t
val EOFpos: t -> pos * t
val getSubstr: fileOffset -> fileOffset -> t -> string
val getLine: t -> string option * t
val getFname: t -> string
(* both throw IO.Io *)
val create: string -> t
val createFromInstream: string -> TextIO.instream -> t
val getOffset: t -> fileOffset
val isFirstOnLine: t -> fileOffset -> bool
val getPosRaw: fileOffset -> t -> pos * t
val getPos: t -> pos * t
val getPosAfterChar: t -> pos * t
end
|