From 560ab0ba6eb33d17df889e4fb1536cbaff6cba49 Mon Sep 17 00:00:00 2001 From: Xander Date: Fri, 30 Jun 2023 13:54:27 +0200 Subject: Calling ats function --- kernel/main.c | 4 ---- kernel/main.dats | 13 +++++++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) delete mode 100644 kernel/main.c create mode 100644 kernel/main.dats (limited to 'kernel') diff --git a/kernel/main.c b/kernel/main.c deleted file mode 100644 index 6de1868..0000000 --- a/kernel/main.c +++ /dev/null @@ -1,4 +0,0 @@ - -void test(double a) {} -int main() { test(3.0); } - diff --git a/kernel/main.dats b/kernel/main.dats new file mode 100644 index 0000000..1eb7813 --- /dev/null +++ b/kernel/main.dats @@ -0,0 +1,13 @@ +#include "share/atspre_staload.hats" + +typedef test = @{test2 = uint8} + +extern castfn uint8_of {n: nat} (i: int n): uint8 n + +implement main0 () = +let + val t = @{test2 = uint8_of(4)} : test +in + main0 () +end + -- cgit v1.2.3