aboutsummaryrefslogtreecommitdiff
path: root/lib/DATS/init.dats
diff options
context:
space:
mode:
authorXander <xander@biltopia.org>2023-07-28 00:57:36 +0200
committerXander <xander@biltopia.org>2023-07-28 00:57:36 +0200
commit11539792ffcbdba74d6ca63dea2be937d62de7fc (patch)
tree06d1250dcb064a5192aad0de81d81dab83b025fc /lib/DATS/init.dats
parent018d1489e6fc0c6363442033abd674f287e6f5cd (diff)
downloadats-os-11539792ffcbdba74d6ca63dea2be937d62de7fc.tar.xz
ats-os-11539792ffcbdba74d6ca63dea2be937d62de7fc.zip
Added template init_exec function
Diffstat (limited to 'lib/DATS/init.dats')
-rw-r--r--lib/DATS/init.dats14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/DATS/init.dats b/lib/DATS/init.dats
index 492d5dc..a4c84b3 100644
--- a/lib/DATS/init.dats
+++ b/lib/DATS/init.dats
@@ -7,3 +7,17 @@ let
in
@{initialized = false, obj = v}: initializable vt
end
+
+
+implement{vt} init_exec (x) =
+ if x.initialized then
+ let
+ prval () = opt_unsome x.obj
+ val () = init_exec$fwork (x.obj)
+ prval () = opt_some x.obj
+ in
+ end
+
+implement{vt} init_exec$fwork (v) = ()
+
+