hello.quox tweaks
This commit is contained in:
parent
310822ffa5
commit
e2ad18ff1f
1 changed files with 3 additions and 3 deletions
|
@ -12,13 +12,13 @@ def bind : 0.(A B : ★) → IO A → (A → IO B) → IO B =
|
|||
def seq : IO Unit → IO Unit → IO Unit =
|
||||
λ a b ⇒ bind Unit Unit a (λ u ⇒ drop-unit (IO Unit) u b)
|
||||
|
||||
#[compile-scheme "(lambda (n) (builtin-io (display n) (newline) 'tt))"]
|
||||
#[compile-scheme "(lambda (n) (builtin-io (printf \"~d~n\" n) 'tt))"]
|
||||
postulate print-ℕ : ℕ → IO Unit
|
||||
|
||||
#[compile-scheme "(lambda (str) (builtin-io (display str) (newline) 'tt))"]
|
||||
#[compile-scheme "(lambda (s) (builtin-io (printf \"~s~n\" s) 'tt))"]
|
||||
postulate print : String → IO Unit
|
||||
|
||||
load "nat.quox"
|
||||
|
||||
#[main]
|
||||
def main = seq (print-ℕ (nat.plus 1000000000 1)) (print "(nice)")
|
||||
def main = seq (print-ℕ (nat.plus 60 9)) (print "(nice)")
|
||||
|
|
Loading…
Reference in a new issue