diff options
| author | Alasdair Armstrong | 2018-12-12 19:11:22 +0000 |
|---|---|---|
| committer | Alasdair Armstrong | 2018-12-12 19:11:22 +0000 |
| commit | aa6a4d4630e05e50782ec6880ada116ac4fbe795 (patch) | |
| tree | 5504857b3c281fc83befb6320d100aca993dcd80 /src | |
| parent | 6a40f1a1fca791c141c9c4e71dbb1876812666a6 (diff) | |
Add parallelism limit to C and builtins test
Spawning a process for every test and running every test in parallel
is quite RAM intensive (up to about 8gb) especially when running
valgrind on every test in parallel. Now we only run up to TEST_PAR
tests in parallel (default 4).
Diffstat (limited to 'src')
| -rw-r--r-- | src/type_check.ml | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/type_check.ml b/src/type_check.ml index 47275594..8359dac2 100644 --- a/src/type_check.ml +++ b/src/type_check.ml @@ -2321,8 +2321,7 @@ let rec check_exp env (E_aux (exp_aux, (l, ())) as exp : unit exp) (Typ_aux (typ let inferred_exp = infer_funapp l env f xs (Some typ) in type_coercion env inferred_exp typ | E_if (cond, then_branch, else_branch), _ -> - (* let cond' = crule check_exp env cond (mk_typ (Typ_id (mk_id "bool"))) in *) - let cond' = irule infer_exp env cond in + let cond' = try irule infer_exp env cond with Type_error _ -> crule check_exp env cond bool_typ in begin match destruct_exist (typ_of cond') with | Some (kopts, nc, Typ_aux (Typ_app (ab, [A_aux (A_bool flow, _)]), _)) when string_of_id ab = "atom_bool" -> let env = add_existential l kopts nc env in |
