2023-01-20 23:21:42 +03:00
|
|
|
```catala
|
|
|
|
declaration scope SubFoo:
|
|
|
|
input x content integer
|
|
|
|
output y content integer
|
|
|
|
|
|
|
|
declaration scope Foo:
|
|
|
|
output z content integer
|
|
|
|
|
|
|
|
scope SubFoo:
|
|
|
|
definition y equals x + x
|
|
|
|
|
|
|
|
scope Foo:
|
|
|
|
definition z equals
|
|
|
|
(output of SubFoo with { -- x: 1 }).y
|
|
|
|
```
|
|
|
|
|
2023-12-05 18:54:14 +03:00
|
|
|
|
|
|
|
|
|
|
|
```catala-test-inline
|
2023-12-05 14:00:15 +03:00
|
|
|
$ catala Typecheck --check-invariants
|
2024-05-03 13:20:09 +03:00
|
|
|
┌─[RESULT]─
|
|
|
|
│All invariant checks passed
|
|
|
|
└─
|
|
|
|
┌─[RESULT]─
|
|
|
|
│Typechecking successful!
|
|
|
|
└─
|
2023-12-05 18:54:14 +03:00
|
|
|
```
|
|
|
|
|
2023-01-20 23:21:42 +03:00
|
|
|
```catala-test-inline
|
|
|
|
$ catala Proof -s Foo
|
2024-05-03 13:20:09 +03:00
|
|
|
┌─[RESULT]─
|
|
|
|
│No errors found during the proof mode run.
|
|
|
|
└─
|
2023-01-20 23:21:42 +03:00
|
|
|
```
|