diff options
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) %) |