From 9d007f52d02d23ed95d28c7b805b65bbdc47de6a Mon Sep 17 00:00:00 2001 From: acondolu Date: Thu, 14 Jun 2018 23:14:26 +0200 Subject: [PATCH] One garbage pt. 2 --- ocaml/simple.ml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ocaml/simple.ml b/ocaml/simple.ml index d600d30..b640a0f 100644 --- a/ocaml/simple.ml +++ b/ocaml/simple.ml @@ -363,8 +363,11 @@ let problem_of (label, div, convs, ps, var_names) = | `Var(v,_) -> V v | `N _ | `Match _ -> assert false in assert (List.length ps = 0); - let convs = List.rev convs in - let conv = if List.length convs = 1 then aux (List.hd convs :> Num.nf) else List.fold_left (fun x y -> mk_app x (aux (y :> Num.nf))) (V (List.length var_names)) convs in + let convs = (List.rev convs :> Num.nf list) in + let conv = aux + (if List.length convs = 1 + then List.hd convs + else `I((List.length var_names, min_int), Listx.from_list convs)) in let var_names = "@" :: var_names in let div = match div with | Some div -> aux (div :> Num.nf) -- 2.39.2