]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/cic_proof_checking/cicElim.ml
Big commit and major code clean-up:
[helm.git] / helm / ocaml / cic_proof_checking / cicElim.ml
index b85a4a519a01cbd95dc77438cdd0a5a555f2b820..707a7b2b2ed522886791f670aacb7d21af1787fb 100644 (file)
@@ -28,6 +28,8 @@ open Printf
 exception Elim_failure of string
 exception Can_t_eliminate
 
+let debug_print = fun _ -> ()
+
 let fresh_binder =
   let counter = ref ~-1 in
   function
@@ -337,8 +339,8 @@ let elim_of ?(sort = Cic.Type (CicUniv.fresh ())) uri typeno =
         add_params (fun b s t -> Cic.Lambda (b, s, t)) leftno ty cic
       in
 (*
-prerr_endline (CicPp.ppterm eliminator_type);
-prerr_endline (CicPp.ppterm eliminator_body);
+debug_print (CicPp.ppterm eliminator_type);
+debug_print (CicPp.ppterm eliminator_body);
 *)
       let (computed_type, ugraph) =
         try
@@ -362,8 +364,11 @@ prerr_endline (CicPp.ppterm eliminator_body);
         | _ -> assert false
       in
       let name = UriManager.name_of_uri uri ^ suffix in
+      let buri = UriManager.buri_of_uri uri in
+      let uri = UriManager.uri_of_string (buri ^ "/" ^ name ^ ".con") in
       let obj_attrs = [`Class (`Elim sort); `Generated] in
-      Cic.Constant (name, Some eliminator_body, eliminator_type, [], obj_attrs)
+       uri,
+       Cic.Constant (name, Some eliminator_body, eliminator_type, [], obj_attrs)
   | _ ->
       failwith (sprintf "not an inductive definition (%s)"
         (UriManager.string_of_uri uri))