catala/tests/backends/simple.catala_en

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
578 B
Plaintext
Raw Normal View History

2023-12-11 15:26:13 +03:00
```catala
declaration structure Foo:
data x content boolean
data y content decimal
declaration enumeration Bar:
-- No
-- Yes content Foo
declaration scope Baz:
context a content Bar
2023-12-11 15:26:13 +03:00
output b content decimal
2024-01-22 18:49:58 +03:00
output c content list of decimal
2023-12-11 15:26:13 +03:00
scope Baz:
2024-01-17 19:26:41 +03:00
definition a equals No
2023-12-11 15:26:13 +03:00
definition b equals
match a with pattern
-- No: 0.0
-- Yes of foo: foo.y + if foo.x then 1.0 else 0.0
2023-12-13 18:40:22 +03:00
exception definition b under condition
a with pattern No
consequence equals 42.0
2024-01-22 18:49:58 +03:00
definition c equals [b;b]
2023-12-18 16:42:58 +03:00
```
```catala-test { id = "c" }
$ catala c
```