]> matita.cs.unibo.it Git - helm.git/blobdiff - components/cic_acic/cic2Xml.ml
BIG FAT COMMIT REGARDING COERCIONS:
[helm.git] / components / cic_acic / cic2Xml.ml
index 95f92346bcdb066e24ea9f979a8274f294cc77a8..31765f0552e8005d3c9168138a981026514dd38a 100644 (file)
@@ -269,7 +269,8 @@ let print_term ?ids_to_inner_sorts =
 
 let xml_of_attrs attributes =
   let class_of = function
-    | `Coercion -> Xml.xml_empty "class" [None,"value","coercion"]
+    | `Coercion n -> 
+        Xml.xml_empty "class" [None,"value","coercion";None,"arity",string_of_int n]
     | `Elim s ->
         Xml.xml_nempty "class" [None,"value","elim"]
          [< Xml.xml_empty
@@ -279,9 +280,13 @@ let xml_of_attrs attributes =
     | `Record field_names ->
         Xml.xml_nempty "class" [None,"value","record"]
          (List.fold_right
-           (fun (name,coercion) res ->
+           (fun (name,coercion,arity) res ->
              [< Xml.xml_empty "field" 
-                [None,"name",if coercion then name ^ " coercion" else name]; 
+                [None,"name",
+                  if coercion then 
+                    name ^ " coercion " ^ string_of_int arity 
+                  else 
+                    name]; 
               res >]
            ) field_names [<>])
     | `Projection -> Xml.xml_empty "class" [None,"value","projection"]