Commit 8d1e1b2e authored by Julien Lopez's avatar Julien Lopez
Browse files

[TESTS][LAMBDA][MINOR] Minor fix and modifs

parent a74737ff
......@@ -13,6 +13,7 @@ let type_of_string s = match s with
| "Char" -> Builtin_defs.char
| "Bool" -> Builtin_defs.bool
| "Any" -> Builtin_defs.any
| "Empty" -> Types.empty
| _ -> failwith (Printf.sprintf "Type %s not recognized" s)
let rec _to_typed env l expr =
......@@ -78,8 +79,7 @@ let rec _to_typed env l expr =
| String (_, s) ->
let i = Big_int.big_int_of_int 0 in
let s = Types.String (0, (String.length s) - 1, s, Types.Integer i) in
env, l, { exp_loc=loc; exp_typ=(type_of_string "String");
exp_descr=Cst s }
env, l, { exp_loc=loc; exp_typ=Builtin_defs.string; exp_descr=Cst s }
| Bool (origloc, b) ->
let t = Builtin_defs.true_type in
let f = Builtin_defs.false_type in
......@@ -87,7 +87,7 @@ let rec _to_typed env l expr =
| "true" -> env, l, { exp_loc=loc; exp_typ=t;
exp_descr=Cst (Types.Atom (Builtin_defs.true_atom)) }
| "false" -> env, l, { exp_loc=loc; exp_typ=f;
exp_descr=Cst (Types.Atom (Builtin_defs.true_atom)) }
exp_descr=Cst (Types.Atom (Builtin_defs.false_atom)) }
| _ ->
let line = Loc.start_line origloc in
let cbegin = Loc.start_off origloc - Loc.start_bol origloc in
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment