From 7b29b31648fd737e7bbc007f480b799add91bc6b Mon Sep 17 00:00:00 2001 From: Vladimir Azarov Date: Fri, 4 Apr 2025 18:24:46 +0200 Subject: Beginning of the preprocessor --- stream.sig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'stream.sig') 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 -- cgit v1.2.3