1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-14 08:27:03 +03:00
juvix/tests/positive/MiniC
Paul Cadman be9872ea06
Add builtin if (#1585)
```
builtin boolean-if
if : {A : Type} → Bool → A → A → A;
if true x _ := x;
if false _ x := x;
```

This allows a backend to translate if directly, so that only one branch
is evalutated.

An example compilation of if is given for the legacy backend for testing.
2022-10-14 10:06:05 +01:00
..
AlwaysValidVP remove ≔ from the language and replace it by := (#1563) 2022-09-30 10:55:32 +10:00
AxiomNoCompile remove ≔ from the language and replace it by := (#1563) 2022-09-30 10:55:32 +10:00
Builtins Add builtin if (#1585) 2022-10-14 10:06:05 +01:00
ClosureEnv remove ≔ from the language and replace it by := (#1563) 2022-09-30 10:55:32 +10:00
ClosureNoEnv remove ≔ from the language and replace it by := (#1563) 2022-09-30 10:55:32 +10:00
ExportName remove ≔ from the language and replace it by := (#1563) 2022-09-30 10:55:32 +10:00
ExportNameArgs remove ≔ from the language and replace it by := (#1563) 2022-09-30 10:55:32 +10:00
HelloWorld remove ≔ from the language and replace it by := (#1563) 2022-09-30 10:55:32 +10:00
HigherOrder remove ≔ from the language and replace it by := (#1563) 2022-09-30 10:55:32 +10:00
ImportExportName remove ≔ from the language and replace it by := (#1563) 2022-09-30 10:55:32 +10:00
Lib remove ≔ from the language and replace it by := (#1563) 2022-09-30 10:55:32 +10:00
MultiModules remove ≔ from the language and replace it by := (#1563) 2022-09-30 10:55:32 +10:00
MutuallyRecursive remove ≔ from the language and replace it by := (#1563) 2022-09-30 10:55:32 +10:00
Nat remove ≔ from the language and replace it by := (#1563) 2022-09-30 10:55:32 +10:00
NestedList remove ≔ from the language and replace it by := (#1563) 2022-09-30 10:55:32 +10:00
PolymorphicAxioms Direct translation from MicroJuvix to MiniC (#1386) 2022-07-19 15:04:10 +02:00
PolymorphicTarget Give a proper type to literal natural numbers (#1453) 2022-08-12 17:31:15 +02:00
Polymorphism remove ≔ from the language and replace it by := (#1563) 2022-09-30 10:55:32 +10:00
PolymorphismHoles remove ≔ from the language and replace it by := (#1563) 2022-09-30 10:55:32 +10:00
SimpleFungibleTokenImplicit remove ≔ from the language and replace it by := (#1563) 2022-09-30 10:55:32 +10:00
StdlibImport remove ≔ from the language and replace it by := (#1563) 2022-09-30 10:55:32 +10:00