try HExtlib.split_nth (cpos+sats+1) tl with Failure _ -> [],[]
in
if rest = [] then
- idref aid (List.nth (List.map k tl) cpos)
+ idref aid (k (List.nth tl cpos))
else
idref aid (Ast.Appl (List.map k (List.nth tl cpos::rest)))
else
- idref aid (Ast.Appl (List.map k tl))
+ idref aid (Ast.Appl (List.map k args))
else
idref aid (Ast.Appl (List.map k args)))
| Cic.AAppl (aid,args) ->
let init () = List.iter (fun f -> f []) !load_patterns32s
let instantiate_appl_pattern
- ~mk_appl ~mk_implicit ~term_of_uri env appl_pattern
+ ~mk_appl ~mk_implicit ~term_of_uri ~term_of_nref env appl_pattern
=
let lookup name =
try List.assoc name env
in
let rec aux = function
| Ast.UriPattern uri -> term_of_uri uri
+ | Ast.NRefPattern nref -> term_of_nref nref
| Ast.ImplicitPattern -> mk_implicit false
| Ast.VarPattern name -> lookup name
| Ast.ApplPattern terms -> mk_appl (List.map aux terms)