mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-08 07:51:43 +03:00
Restore tests
This commit is contained in:
parent
b48fb0e223
commit
a033f02689
File diff suppressed because it is too large
Load Diff
@ -22,11 +22,9 @@ $ catala Typecheck --check-invariants
|
||||
```catala-test-inline
|
||||
$ catala Lcalc --avoid-exceptions -O --closure-conversion
|
||||
type Eoption = | ENone of unit | ESome of any
|
||||
|
||||
type S_in = { x_in: bool; }
|
||||
|
||||
type S = { z: integer; }
|
||||
|
||||
|
||||
let topval closure_f : (closure_env, integer) → integer =
|
||||
λ (env: closure_env) (y: integer) →
|
||||
if (from_closure_env env).0 then y else - y
|
||||
|
@ -27,8 +27,7 @@ let scope S (S_in: S_in {x_in: list of integer}): S {y: integer} =
|
||||
(reduce
|
||||
(λ (x1: (integer * integer)) (x2: (integer * integer)) →
|
||||
if x1.1 < x2.1 then x1 else x2)
|
||||
let potential_max : integer = -1 in
|
||||
(potential_max, potential_max)
|
||||
(-1, -1)
|
||||
map (λ (potential_max: integer) → (potential_max, potential_max)) x).0
|
||||
in
|
||||
return { S y = y; }
|
||||
|
@ -20,11 +20,9 @@ $ catala Typecheck --check-invariants
|
||||
```catala-test-inline
|
||||
$ catala Lcalc --avoid-exceptions -O --closure-conversion
|
||||
type Eoption = | ENone of unit | ESome of any
|
||||
|
||||
type S_in = { x_in: bool; }
|
||||
|
||||
type S = { f: ((closure_env, integer) → integer * closure_env); }
|
||||
|
||||
|
||||
let topval closure_f : (closure_env, integer) → integer =
|
||||
λ (env: closure_env) (y: integer) →
|
||||
if (from_closure_env env).0 then y else - y
|
||||
|
@ -51,30 +51,23 @@ $ catala Typecheck --check-invariants
|
||||
```catala-test-inline
|
||||
$ catala Lcalc --avoid-exceptions -O --closure-conversion
|
||||
type Eoption = | ENone of unit | ESome of any
|
||||
|
||||
type Result = {
|
||||
r: ((closure_env, integer) → integer * closure_env);
|
||||
q: integer;
|
||||
}
|
||||
|
||||
type SubFoo1_in = { x_in: integer; }
|
||||
|
||||
type SubFoo1 = {
|
||||
x: integer;
|
||||
y: ((closure_env, integer) → integer * closure_env);
|
||||
}
|
||||
|
||||
type SubFoo2_in = { x1_in: integer; x2_in: integer; }
|
||||
|
||||
type SubFoo2 = {
|
||||
x1: integer;
|
||||
y: ((closure_env, integer) → integer * closure_env);
|
||||
}
|
||||
|
||||
type Foo_in = { b_in: ((closure_env, unit) → eoption bool * closure_env); }
|
||||
|
||||
type Foo = { z: integer; }
|
||||
|
||||
|
||||
let topval closure_y : (closure_env, integer) → integer =
|
||||
λ (env: closure_env) (z: integer) →
|
||||
(from_closure_env env).0 + z
|
||||
|
Loading…
Reference in New Issue
Block a user