add golden test stuff

This commit is contained in:
rhiannon morris 2024-04-14 20:47:59 +02:00
parent b7dc5ffdc4
commit 8823154973
24 changed files with 126 additions and 0 deletions

View file

@ -0,0 +1,12 @@
0.IO : 1.★ → ★
ω.print : 1.String → IO {ok}
ω.main : IO {ok}
IO = □
print = scheme:(lambda (str) (builtin-io (display str) (newline)))
#[main] main = print "hello 🐉"
;; IO erased
(define print
(lambda (str) (builtin-io (display str) (newline))))
(define main
(print "hello \x1f409;"))
hello 🐉

View file

@ -0,0 +1,7 @@
def0 IO : ★ → ★ = λ A ⇒ IOState → A × IOState
#[compile-scheme "(lambda (str) (builtin-io (display str) (newline)))"]
postulate print : String → IO {ok}
#[main]
def main = print "hello 🐉"

View file

@ -0,0 +1,2 @@
. ../lib.sh
compile_run "$1" hello.quox hello.ss