]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/mathql_generator/mQueryGenerator.ml
first moogle template checkin
[helm.git] / helm / ocaml / mathql_generator / mQueryGenerator.ml
index 7175eb6153179519a714a1dc22075a75d6bb48c0..f66c42b6c05a62b9a263ca5e5dd4764ddf0905ef 100644 (file)
@@ -81,7 +81,13 @@ let compose cl =
       M.Property(true,M.RefineExact,[n],[],(cons false c),[],[],false,(M.Const ""))
    in   
    let property_only n cl =
-      let cll = List.map (cons true) cl in
+      let rec build = function
+         | []      -> []
+        | c :: tl ->
+           let r = (cons true) c in
+           if r = [] then build tl else r :: build tl 
+      in
+      let cll = build cl in
       M.Property(false,M.RefineExact,[n],[],!univ,cll,[],false,(M.Proj(None,(M.AVar "obj"))))
    in
    let rec aux = function