with Not_found -> "Type") in
if sort ="Prop" then
let inductive_types =
- (match CicEnvironment.get_obj uri with
- Cic.Constant _ -> assert false
- | Cic.Variable _ -> assert false
- | Cic.CurrentProof _ -> assert false
- | Cic.InductiveDefinition (l,_,_) -> l
+ (let o,_ =
+ CicEnvironment.get_obj uri CicUniv.empty_ugraph
+ in
+ match o with
+ Cic.Constant _ -> assert false
+ | Cic.Variable _ -> assert false
+ | Cic.CurrentProof _ -> assert false
+ | Cic.InductiveDefinition (l,_,_) -> l
) in
let (_,_,_,constructors) =
List.nth inductive_types tyno in
else raise Not_a_proof
| C.AMutCase (id,uri,typeno,ty,te,patterns) ->
let inductive_types,noparams =
- (match CicEnvironment.get_obj uri with
- Cic.Constant _ -> assert false
- | Cic.Variable _ -> assert false
- | Cic.CurrentProof _ -> assert false
- | Cic.InductiveDefinition (l,_,n) -> l,n
- ) in
+ (let o, _ = CicEnvironment.get_obj uri CicUniv.empty_ugraph in
+ match o with
+ Cic.Constant _ -> assert false
+ | Cic.Variable _ -> assert false
+ | Cic.CurrentProof _ -> assert false
+ | Cic.InductiveDefinition (l,_,n) -> l,n
+ ) in
let (_,_,_,constructors) = List.nth inductive_types typeno in
let name_and_arities =
let rec count_prods =
let ind_str = (prefix ^ ".ind") in
let ind_uri = UriManager.uri_of_string ind_str in
let inductive_types,noparams =
- (match CicEnvironment.get_obj ind_uri with
- Cic.Constant _ -> assert false
- | Cic.Variable _ -> assert false
- | Cic.CurrentProof _ -> assert false
- | Cic.InductiveDefinition (l,_,n) -> (l,n)
- ) in
+ (let o,_ = CicEnvironment.get_obj ind_uri CicUniv.empty_ugraph in
+ match o with
+ Cic.Constant _ -> assert false
+ | Cic.Variable _ -> assert false
+ | Cic.CurrentProof _ -> assert false
+ | Cic.InductiveDefinition (l,_,n) -> (l,n)
+ ) in
let rec split n l =
if n = 0 then ([],l) else
let p,a = split (n-1) (List.tl l) in