1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-15 10:03:22 +03:00
juvix/tests/positive/Termination/Data/Bool.mjuvix
2022-04-04 17:44:08 +02:00

26 lines
427 B
Plaintext

module Data.Bool;
inductive Bool {
true : Bool;
false : Bool;
};
not : Bool → Bool;
not true ≔ false;
not false ≔ true;
infixr 2 ||;
|| : Bool → Bool → Bool;
|| false a ≔ a;
|| true _ ≔ true;
infixr 2 &&;
&& : Bool → Bool → Bool;
&& false _ ≔ false;
&& true a ≔ a;
ite : (a : Type) → Bool → a → a → a;
ite _ true a _ ≔ a;
ite _ false _ b ≔ b;
end;