diff options
Diffstat (limited to 'kernel/prelude/DATS')
-rw-r--r-- | kernel/prelude/DATS/print.dats | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/kernel/prelude/DATS/print.dats b/kernel/prelude/DATS/print.dats index b183da5..ac864ad 100644 --- a/kernel/prelude/DATS/print.dats +++ b/kernel/prelude/DATS/print.dats @@ -7,34 +7,34 @@ staload "lib/DATS/itoa.dats" staload UN = "prelude/SATS/unsafe.sats" -extern fun print_newline() : void +extern fun print_newline() :<!wrt> void implement print_newline() = put_string("\n") -extern fun assert_errmsg(b: bool, msg: string) : void +extern fun assert_errmsg(b: bool, msg: string) :<!wrt> void implement assert_errmsg(b,msg) = if (~b) then put_string(msg) -extern fun print_int (n : int) : void +extern fun print_int (n : int) :<!wrt> void implement print_int(n) = put_string(itoa(n,10)) -extern fun print_uint32 (n : uint32) : void +extern fun print_uint32 (n : uint32) :<!wrt> void implement print_uint32 (n) = put_string(itoa($UN.cast{int}(n),10)) -extern fun print_uint16 (n : uint16) : void +extern fun print_uint16 (n : uint16) :<!wrt> void implement print_uint16 (n) = put_string(itoa($UN.cast{int}(n),10)) -extern fun print_uint8 (n : uint8) : void +extern fun print_uint8 (n : uint8) :<!wrt> void implement print_uint8 (n) = put_string(itoa($UN.cast{int}(n),10)) -extern fun print_uint64 (n : uint64) : void +extern fun print_uint64 (n : uint64) :<!wrt> void implement print_uint64 (n) = put_string(itoa($UN.cast{int}(n),10)) -extern fun print_size_t (n : size_t) : void +extern fun print_size_t (n : size_t) :<!wrt> void implement print_size_t (n) = put_string(itoa($UN.cast{int}(n),10)) -extern fun print_uint (n : uint) : void +extern fun print_uint (n : uint) :<!wrt> void implement print_uint (n) = put_string(itoa($UN.cast{int}(n),10)) -extern fun print_addr (n : Ptr) : void +extern fun print_addr (n : Ptr) :<!wrt> void implement print_addr (n) = put_string(itoa($UN.cast{int}(n),10)) overload print with put_string of 1 @@ -47,10 +47,10 @@ overload print with print_size_t of 1 overload print with print_uint of 1 overload print with print_addr of 1 -extern fun {a : t@ype} println_base {n:nat | n > 1 && n < 33} (n :a, base : int n) : void +extern fun {a : t@ype} println_base {n:nat | n > 1 && n < 33} (n :a, base : int n) :<!wrt> void implement{a} println_base(n,base) = println!(itoa($UN.cast{int}(n), base)) -extern fun {a : t@ype} print_base {n:nat | n > 1 && n < 33} (n :a, base : int n) : void +extern fun {a : t@ype} print_base {n:nat | n > 1 && n < 33} (n :a, base : int n) :<!wrt> void implement{a} print_base(n,base) = put_string(itoa($UN.cast{int}(n), base)) macdef println_hex(s) = (put_string "0x"; println_base(,(s), 16)) |