summaryrefslogtreecommitdiff
path: root/stream.sml
diff options
context:
space:
mode:
Diffstat (limited to 'stream.sml')
-rw-r--r--stream.sml10
1 files changed, 3 insertions, 7 deletions
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) %)