blob: 9b5def019c656968b85e3f8d24e91d75ea31d0d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#include "share/atspre_staload.hats"
#define ATS_DYNLOADFLAG 0
staload "kernel/output/writer.sats"
staload "kernel/itoa.dats"
extern fun print_newline() : void
implement print_newline() = put_string("\n")
extern fun assert_errmsg(b: bool, msg: string) : void
implement assert_errmsg(b,msg) = if (~b) then put_string(msg)
extern fun print_int {n : nat | n > 0} (n : int n) : void
implement print_int(n) = put_string(itoa(n,10))
overload print with put_string of 1
overload print with print_int of 1
macdef assertloc(tf) = assert_errmsg (,(tf), $mylocation)
|