diff options
author | Vladimir Azarov <avm@intermediate-node.net> | 2025-05-30 11:42:15 +0200 |
---|---|---|
committer | Vladimir Azarov <avm@intermediate-node.net> | 2025-05-30 11:42:15 +0200 |
commit | c0599bcbb92af9cbaea52af3560ae08009d1b09d (patch) | |
tree | 482fec902413c950bec8c252fc7e52a2c34cf910 /stream.sml | |
parent | 8a8a17e19bc4d474436d518f10c4d2dc5314fc0d (diff) |
New printf combinator interface
Diffstat (limited to 'stream.sml')
-rw-r--r-- | stream.sml | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -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) %) |