aboutsummaryrefslogtreecommitdiff
path: root/lib/DATS/init.dats
diff options
context:
space:
mode:
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) = ()
+
+