let module C = Cic in
let module R = CicReduction in
let module U = UriManager in
- match CicEnvironment.get_cooked_obj uri with
+ let obj =
+ try
+ CicEnvironment.get_cooked_obj uri
+ with Not_found -> assert false
+ in
+ match obj with
C.Constant (_,_,ty,_) -> ty
| C.CurrentProof (_,_,_,ty,_) -> ty
| _ ->
let module C = Cic in
let module R = CicReduction in
let module U = UriManager in
- match CicEnvironment.get_cooked_obj uri with
+ let obj =
+ try
+ CicEnvironment.get_cooked_obj uri
+ with Not_found -> assert false
+ in
+ match obj with
C.Variable (_,_,ty,_) -> ty
| _ ->
raise
let module C = Cic in
let module R = CicReduction in
let module U = UriManager in
- match CicEnvironment.get_cooked_obj uri with
+ let obj =
+ try
+ CicEnvironment.get_cooked_obj uri
+ with Not_found -> assert false
+ in
+ match obj with
C.InductiveDefinition (dl,_,_) ->
let (_,_,arity,_) = List.nth dl i in
arity
let module C = Cic in
let module R = CicReduction in
let module U = UriManager in
- match CicEnvironment.get_cooked_obj uri with
+ let obj =
+ try
+ CicEnvironment.get_cooked_obj uri
+ with Not_found -> assert false
+ in
+ match obj with
C.InductiveDefinition (dl,_,_) ->
let (_,_,_,cl) = List.nth dl i in
let (_,ty) = List.nth cl (j-1) in
| C.MutCase (uri, i, outtype, term, pl) ->
(* first, get the inductive type (and noparams) in the environment *)
let (_,b,arity,constructors), expl_params, no_left_params =
- match CicEnvironment.get_cooked_obj ~trust:true uri with
+ let obj =
+ try
+ CicEnvironment.get_cooked_obj ~trust:true uri
+ with Not_found -> assert false
+ in
+ match obj with
C.InductiveDefinition (l,expl_params,parsno) ->
List.nth l i , expl_params, parsno
| _ ->