aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorXander <xander@biltopia.org>2023-07-27 00:46:53 +0200
committerXander <xander@biltopia.org>2023-07-27 00:46:53 +0200
commit54435375f29152ddbce1cd362a137280450eba94 (patch)
treebed15b05a43d77d87977d35e337252577b46c92c /lib
parent6cacc45cdf11ca0e605bb7c6356c569c8aed760b (diff)
downloadats-os-54435375f29152ddbce1cd362a137280450eba94.tar.xz
ats-os-54435375f29152ddbce1cd362a137280450eba94.zip
migrated frame_allocator to opt. side effects constrains not implemented yet
Diffstat (limited to 'lib')
-rw-r--r--lib/DATS/init.dats9
-rw-r--r--lib/SATS/init.sats4
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/DATS/init.dats b/lib/DATS/init.dats
new file mode 100644
index 0000000..3bc5034
--- /dev/null
+++ b/lib/DATS/init.dats
@@ -0,0 +1,9 @@
+staload "lib/SATS/init.sats"
+
+#define ATS_DYNLOADFLAG 0
+
+implement {vt:viewt@ype} empty (v) =
+let
+in
+ @{enabled = false, obj = v}: enablable vt
+end
diff --git a/lib/SATS/init.sats b/lib/SATS/init.sats
new file mode 100644
index 0000000..83b5e8d
--- /dev/null
+++ b/lib/SATS/init.sats
@@ -0,0 +1,4 @@
+viewtypedef enablable (vt:viewt@ype) =
+ [enabled: bool] @{ enabled = bool enabled, obj = opt (vt, enabled) }
+
+fun {vt:viewt@ype} empty (v : opt(vt,false)): enablable vt