From d6cd7d2069e780cfc4ae13e98be1d0c802a89b9d Mon Sep 17 00:00:00 2001 From: Alasdair Date: Fri, 14 Dec 2018 02:26:33 +0000 Subject: A few additional tests --- src/c_backend.ml | 2 ++ src/type_check.ml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3