]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/mathql_interpreter/mqint.ml
After add relation.ml relation.mli
[helm.git] / helm / ocaml / mathql_interpreter / mqint.ml
index 95d3c8f2e47f9b5aa37e17e000a87b49ab508630..688158faca551b87c1e8aa2fa3d663d75595c2a3 100644 (file)
@@ -327,7 +327,13 @@ and exec_boole_exp c = function
 (* valuta una MathQL.val_exp e ritorna un MathQL.value *)
 
 and exec_val_exp c = function
-   | MathQL.Const x -> List.sort compare x
+   | MathQL.Const x -> let ol = List.sort compare x in 
+                       let rec edup = function
+                          [] ->
+                        | s::tl -> if s = (List.tl tl) then edup tl
+                                   else s::(edup tl)
+                       in
+                        edup ol
    | MathQL.Record (rvar, vvar) -> List.assoc vvar (List.assoc rvar c.groups) 
                                  
    | MathQL.VVar s -> List.assoc s c.vvars