mirror of
https://github.com/anoma/juvix.git
synced 2025-01-07 16:22:14 +03:00
acea6615a4
Closes #1701
17 lines
349 B
Plaintext
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;
|