fst (List.nth (constructors_of_inductive_type uri i) (j-1))
with Not_found -> assert false)
+let hide_coercions = ref true;;
+
let ast_of_acic0 term_info acic k =
let k = k term_info in
let id_to_uris = term_info.uri in
| Cic.ALetIn (id,n,s,t) ->
idref id (Ast.LetIn ((CicNotationUtil.name_of_cic_name n, None),
k s, k t))
- | Cic.AAppl (aid,args) -> idref aid (Ast.Appl (List.map k args))
+ | Cic.AAppl (aid,(Cic.AConst _ as he::tl as args))
+ | Cic.AAppl (aid,(Cic.AMutInd _ as he::tl as args))
+ | Cic.AAppl (aid,(Cic.AMutConstruct _ as he::tl as args)) ->
+ if CoercGraph.is_a_coercion (Deannotate.deannotate_term he) &&
+ !hide_coercions
+ then
+ let rec last =
+ function
+ [] -> assert false
+ | [t] -> t
+ | _::tl -> last tl
+ in
+ idref aid (k (last tl))
+ else
+ idref aid (Ast.Appl (List.map k args))
+ | Cic.AAppl (aid,args) ->
+ idref aid (Ast.Appl (List.map k args))
| Cic.AConst (id,uri,substs) ->
register_uri id uri;
idref id (Ast.Ident (UriManager.name_of_uri uri, aux_substs substs))