aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorXander <xander@biltopia.org>2023-07-28 16:02:02 +0200
committerXander <xander@biltopia.org>2023-07-28 16:02:02 +0200
commitc6ad352a25b6b1d45e56090ccc0432d123b043bc (patch)
tree8f1b620b7c82484cbed14a4445ca7a68cd5b28a1 /lib
parent11539792ffcbdba74d6ca63dea2be937d62de7fc (diff)
downloadats-os-c6ad352a25b6b1d45e56090ccc0432d123b043bc.tar.xz
ats-os-c6ad352a25b6b1d45e56090ccc0432d123b043bc.zip
Work on writer
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