1
1
mirror of https://github.com/anoma/juvix.git synced 2025-01-07 16:22:14 +03:00
juvix/tests/Compilation/positive/test006.juvix
2023-01-25 18:57:47 +01:00

17 lines
349 B
Plaintext

-- if-then-else and lazy boolean operators
module test006;
open import Stdlib.Prelude;
open import Stdlib.Data.Nat.Ord;
terminating
loop : Nat;
loop := loop;
main : IO;
main := printNatLn ((if (3 > 0) 1 loop) + (if (2 < 1) loop (if (7 >= 8) loop 1))) >>
printBoolLn (2 > 0 || loop == 0) >>
printBoolLn (2 < 0 && loop == 0);
end;