anninductiveType list * (* inductive types , *)
UriManager.uri list * int (* parameters,n ind. pars*)
and anninductiveType =
- string * bool * annterm * (* typename, inductive, arity *)
+ id * string * bool * annterm * (* typename, inductive, arity *)
annconstructor list (* constructors *)
and annconstructor =
string * annterm (* id, type *)
| he::tl ->
let tyname = string_of_attr (he#attribute "name")
and inductive = bool_of_attr (he#attribute "inductive")
+ and xid = string_of_attr (he#attribute "id")
and (arity,cons) =
get_names_arity_constructors (he#sub_nodes)
in
- (tyname,inductive,arity,cons)::(get_inductive_types tl) (*CSC 0 a caso *)
+ (xid,tyname,inductive,arity,cons)::(get_inductive_types tl)
;;
(* This is the main function and also the only one used directly from *)
(name, deannotate_term ty, deannotate_term bo)
;;
-let deannotate_inductiveType (name, isinductive, arity, cons) =
+let deannotate_inductiveType (_, name, isinductive, arity, cons) =
(name, isinductive, deannotate_term arity,
List.map (fun (id,ty) -> (id,deannotate_term ty)) cons)
;;
deannotate_term bo,deannotate_term ty,params
)
| C.AInductiveDefinition (_, tys, params, parno) ->
- C.InductiveDefinition ( List.map deannotate_inductiveType tys,
+ C.InductiveDefinition (List.map deannotate_inductiveType tys,
params, parno)
;;
aux
;;
-let print_mutual_inductive_type i2a (_,_,arity,constructors) =
+let print_mutual_inductive_type i2a (_,_,_,arity,constructors) =
[< print_term i2a arity ;
List.fold_right
(fun (name,ty) i -> [< print_term i2a ty ; i >]) constructors [<>]
| C.AInductiveDefinition (id,itl,_,_) ->
set_target id (C.Object annobj) ;
List.iter
- (function (_,_,arity,cl) ->
+ (function (_,_,_,arity,cl) ->
add_target_term arity ;
List.iter (function (_,ty) -> add_target_term ty) cl
) itl