exception Elim_failure of string
exception Can_t_eliminate
+let debug_print = fun _ -> ()
+
let fresh_binder =
let counter = ref ~-1 in
function
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
| _ -> 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))