|
@@ -124,13 +124,12 @@ module Make (A : App) = struct
|
|
|
Array.mapi A.t ~f:(fun i (E { module_ = (module S); expr_witness; _ }) ->
|
|
|
(* Map every values to the Checker *)
|
|
|
let values' =
|
|
|
- List.map values ~f:(function
|
|
|
- | T.Text t -> T.Text t
|
|
|
- | T.Expression e ->
|
|
|
- let exprs =
|
|
|
- List.rev (Helper.expr_i e expr_witness i).values
|
|
|
- in
|
|
|
- T.Expression exprs)
|
|
|
+ List.map values
|
|
|
+ ~f:
|
|
|
+ (T.map_litteral ~f:(fun expr ->
|
|
|
+ match get expr_witness (Array.get expr i) with
|
|
|
+ | None -> failwith "Does not match"
|
|
|
+ | Some value -> value))
|
|
|
in
|
|
|
let value = S.Expression.literal pos values' in
|
|
|
R { value; witness = expr_witness })
|
|
@@ -320,15 +319,6 @@ module Make (A : App) = struct
|
|
|
|
|
|
R { value; witness = instr_witness })
|
|
|
|
|
|
- (** Helper function used to prepare the clauses *)
|
|
|
- let map_clause : (expression, t) S.clause -> S.pos * Expression.t' * t list
|
|
|
- =
|
|
|
- fun clause ->
|
|
|
- let clause_pos, expression, t = clause in
|
|
|
- let expression = expression in
|
|
|
- let clause = (clause_pos, expression, t) in
|
|
|
- clause
|
|
|
-
|
|
|
let rebuild_clause :
|
|
|
type a b.
|
|
|
int ->
|
|
@@ -354,7 +344,6 @@ module Make (A : App) = struct
|
|
|
t =
|
|
|
fun pos clause ~elifs ~else_ ->
|
|
|
(* First, apply the report for all the instructions *)
|
|
|
- let clause = map_clause clause and elifs = List.map elifs ~f:map_clause in
|
|
|
let else_ =
|
|
|
match else_ with
|
|
|
| None -> None
|