diff options
Diffstat (limited to 'lib/SATS')
-rw-r--r-- | lib/SATS/init.sats | 10 | ||||
-rw-r--r-- | lib/SATS/writer.sats | 4 |
2 files changed, 10 insertions, 4 deletions
diff --git a/lib/SATS/init.sats b/lib/SATS/init.sats index 676657b..8219de1 100644 --- a/lib/SATS/init.sats +++ b/lib/SATS/init.sats @@ -3,6 +3,12 @@ viewtypedef initializable (vt:viewt@ype) = fun {vt:viewt@ype} uninitialized (v : opt(vt,false)): initializable vt -fun {vt:viewt@ype} init_exec (x : &(initializable vt)):<!wrt> void -fun {vt:viewt@ype} init_exec$fwork (v : &vt):<!wrt> void +fun {vt:viewt@ype} exec_void (r: ref(initializable vt)):<!refwrt> void +fun {vt:viewt@ype} exec_void$fwork (v : &vt):<!wrt> void + +fun {vt:viewt@ype} {a: t@ype} exec (r: ref(initializable vt), default: a):<!refwrt> a +fun {vt:viewt@ype} {a: t@ype} exec$fwork (v : &vt, default: a):<!wrt> a + +fun {vt:viewt@ype} initialize (r: ref(initializable vt)):<!ref,!wrt> void +fun {vt:viewt@ype} initialize$fwork (v: &vt? >> opt(vt,success)):<!wrt> #[success : bool] bool success diff --git a/lib/SATS/writer.sats b/lib/SATS/writer.sats index 14773ea..b23213f 100644 --- a/lib/SATS/writer.sats +++ b/lib/SATS/writer.sats @@ -22,5 +22,5 @@ datatype color = typedef screenChar = @{ ascii_character = char, color_code = uint8} -fun put_string (str : string) : void -fun clear_screen() : void +fn put_string (str : string) :<!wrt> void +fn clear_screen() : void |