aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/DATS/writer.dats17
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/DATS/writer.dats b/lib/DATS/writer.dats
index b7e9973..9b2fd78 100644
--- a/lib/DATS/writer.dats
+++ b/lib/DATS/writer.dats
@@ -98,24 +98,21 @@ in
implement put_string (str : string) : void = let
val (vbox pf | p) = ref_get_viewptr(writer_ref)
- implement string_foreach$fwork<writer_t> (c,env) = put_char(c,env)
+ implement init_exec$fwork<writer_t>(v) = let
+ implement string_foreach$fwork<writer_t> (c,env) = put_char(c,env)
+ val _ = $effmask_all(string_foreach_env<writer_t> (g1ofg0(str),v))
+ in
+ end
in
- if p->initialized then let
- prval () = opt_unsome p->obj
- val _ = $effmask_ref(string_foreach_env<writer_t> (g1ofg0(str),p->obj))
- prval () = opt_some p->obj
- in
- end
+ init_exec<writer_t>(!p)
end
-
-
implement clear_screen() : void = let
val (vbox pf | p) = ref_get_viewptr(writer_ref)
implement init_exec$fwork<writer_t>(v) = _clear_screen(v)
in
if p->initialized then
- init_exec (!p)
+ init_exec<writer_t> (!p)
else
let
prval () = opt_unnone p->obj