diff options
| author | Alasdair | 2018-12-14 02:26:33 +0000 |
|---|---|---|
| committer | Alasdair | 2018-12-14 02:26:33 +0000 |
| commit | d6cd7d2069e780cfc4ae13e98be1d0c802a89b9d (patch) | |
| tree | fc4f1ffe8bdaad0a0b564438299fbc8a4ae7925b /src | |
| parent | 2d17ea6097cdf6a948b0313cb02ddf7ceb0b1d1f (diff) | |
A few additional tests
Diffstat (limited to 'src')
| -rw-r--r-- | src/c_backend.ml | 2 | ||||
| -rw-r--r-- | src/type_check.ml | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/c_backend.ml b/src/c_backend.ml index 43fa3719..65702764 100644 --- a/src/c_backend.ml +++ b/src/c_backend.ml @@ -139,6 +139,8 @@ let rec ctyp_of_typ ctx typ = | Typ_id id when string_of_id id = "string" -> CT_string | Typ_id id when string_of_id id = "real" -> CT_real + | Typ_app (id, _) when string_of_id id = "atom_bool" -> CT_bool + | Typ_app (id, _) when string_of_id id = "range" || string_of_id id = "atom" -> begin match destruct_range Env.empty typ with | None -> assert false (* Checked if range type in guard *) diff --git a/src/type_check.ml b/src/type_check.ml index 3cfa4bb6..df074567 100644 --- a/src/type_check.ml +++ b/src/type_check.ml @@ -264,7 +264,6 @@ let destruct_exist typ = | Some (kids, nc, nexp) -> Some (List.map (mk_kopt K_int) kids, nc, atom_typ nexp) | None -> destruct_exist' typ - let adding = Util.("Adding " |> darkgray |> clear) (**************************************************************************) @@ -1327,6 +1326,7 @@ and typ_arg_frees ?exs:(exs=KidSet.empty) (A_aux (typ_arg_aux, l)) = | A_nexp n -> nexp_frees ~exs:exs n | A_typ typ -> typ_frees ~exs:exs typ | A_order ord -> order_frees ord + | A_bool nc -> tyvars_of_constraint nc let rec nexp_identical (Nexp_aux (nexp1, _)) (Nexp_aux (nexp2, _)) = match nexp1, nexp2 with |
