From c0599bcbb92af9cbaea52af3560ae08009d1b09d Mon Sep 17 00:00:00 2001 From: Vladimir Azarov Date: Fri, 30 May 2025 11:42:15 +0200 Subject: New printf combinator interface --- stream.sml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'stream.sml') diff --git a/stream.sml b/stream.sml index 4d58911..aa8d0aa 100644 --- a/stream.sml +++ b/stream.sml @@ -28,13 +28,9 @@ structure Stream :> STREAM = struct end z - val Ppos = fn z => - let - fun p (out, Pos (fname, line, col)) = - Printf out `fname `":" I line `":" I col % - in - bind A1 p - end z + fun ppos (Pos (fname, line, col)) out = + Printf out `fname `":" I line `":" I col % + val Ppos = fn z => bind A1 ppos z fun getchar (S as { contents, off, ... }: t) = (String.sub (contents, off), updateStream S s#off (off + 1) %) -- cgit v1.2.3