]> matita.cs.unibo.it Git - helm.git/blobdiff - components/grafite_engine/grafiteEngine.ml
Serious bug fixed: arities of coercions in the .moo files were not computed
[helm.git] / components / grafite_engine / grafiteEngine.ml
index 30aa982d8bec9395ad6813c0af5a19fe3f777c68..95e396003085b59ce219c082beac5d05274258bf 100644 (file)
@@ -424,7 +424,7 @@ type 'a eval_executable =
 type 'a eval_from_moo =
  { efm_go: GrafiteTypes.status -> string -> GrafiteTypes.status }
       
-let coercion_moo_statement_of arity uri =
+let coercion_moo_statement_of (uri,arity) =
   GrafiteAst.Coercion (HExtlib.dummy_floc, uri, false, arity)
 
 let refinement_toolkit = {
@@ -456,11 +456,11 @@ let eval_coercion status ~add_composites uri arity baseuri =
    baseuri
  in
  let moo_content = 
-   List.map (coercion_moo_statement_of arity) (uri::compounds)
+   List.map coercion_moo_statement_of ((uri,arity)::compounds)
  in
  let status = GrafiteTypes.add_moo_content moo_content status in
   {status with GrafiteTypes.proof_status = GrafiteTypes.No_proof},
-   compounds
+   List.map fst compounds
 
 let eval_tactical ~disambiguate_tactic status tac =
  let apply_tactic = apply_tactic ~disambiguate_tactic in
@@ -603,9 +603,9 @@ let add_coercions_of_record_to_moo obj lemmas status =
               in
               let is_a_coercion, arity_coercion = is_a_coercion uri in
               if is_a_coercion then
-                Some (uri, coercion_moo_statement_of arity_coercion uri)
+                Some (uri, coercion_moo_statement_of (uri,arity_coercion))
               else if is_a_wanted_coercion then
-                Some (uri, coercion_moo_statement_of arity_wanted uri)
+                Some (uri, coercion_moo_statement_of (uri,arity_wanted))
               else
                 None)
             lemmas)
@@ -710,6 +710,7 @@ let rec eval_command = {ec_go = fun ~disambiguate_command opts status
       let status, lemmas = add_obj uri obj status in
        {status with 
          GrafiteTypes.proof_status = GrafiteTypes.No_proof},
+        (*CSC: I throw away the arities *)
         uri::lemmas
   | GrafiteAst.Relation (loc, id, a, aeq, refl, sym, trans) -> 
      Setoids.add_relation id a aeq refl sym trans;