summaryrefslogtreecommitdiff
path: root/stream.sig
diff options
context:
space:
mode:
authorVladimir Azarov <avm@intermediate-node.net>2025-04-04 18:24:46 +0200
committerVladimir Azarov <avm@intermediate-node.net>2025-04-04 18:24:46 +0200
commit7b29b31648fd737e7bbc007f480b799add91bc6b (patch)
treee724c15c959d98ece73c186b82a61100f4e8d06a /stream.sig
parentd7d4830443f1e385af862462f976553c8a9033e1 (diff)
Beginning of the preprocessor
Diffstat (limited to 'stream.sig')
-rw-r--r--stream.sig7
1 files changed, 6 insertions, 1 deletions
diff --git a/stream.sig b/stream.sig
index 795d193..2bdb155 100644
--- a/stream.sig
+++ b/stream.sig
@@ -20,7 +20,12 @@ signature STREAM = sig
val getPos: t -> pos
val getPosAfterCharRead: t -> pos
+
+ (* pos must come from t, see pos2pposWithFI *)
val pos2ppos: pos -> t -> ppos
+ (* #id pos must be equal to fileId of fileInfo,
+ * otherwise InvalidFileInfo is thrown *)
+ val pos2pposWithFI: pos -> fileInfo -> ppos
(* Assumed to be called once for given pos, so will throw Unreachable on
* second call *)
@@ -30,5 +35,5 @@ signature STREAM = sig
val isFirstOnLine: pos -> t -> bool
(* throws IO.Io *)
- val streamInit: string -> t
+ val create: string -> t
end