in
aux 1 context
-let interpretate_term ~(context: Cic.name list) ~env ~uri ~is_path ast
+let interpretate_term ?(create_dummy_ids=false) ~(context: Cic.name list) ~env ~uri ~is_path ast
~localization_tbl
=
+ (* create_dummy_ids shouldbe used only for interpretating patterns *)
assert (uri = None);
let rec aux ~localize loc (context: Cic.name list) = function
| CicNotationPt.AttributedTerm (`Loc loc, term) ->
do_branch' context args
in
let (indtype_uri, indtype_no) =
+ if create_dummy_ids then
+ (UriManager.uri_of_string "cic:/fake_indty.con", 0)
+ else
match indty_ident with
| Some (indty_ident, _) ->
(match resolve env (Id indty_ident) () with
let localization_tbl = Cic.CicHash.create 23 in
(* here we are throwing away useful localization informations!!! *)
fst (
- interpretate_term ~context ~env:Environment.empty ~uri:None ~is_path:true
+ interpretate_term ~create_dummy_ids:true
+ ~context ~env:Environment.empty ~uri:None ~is_path:true
path ~localization_tbl, localization_tbl)
let interpretate_obj ~context ~env ~uri ~is_path obj ~localization_tbl =
disambiguate_thing ~dbd ~context ~metasenv ~initial_ugraph ~aliases
~universe ~uri:None ~pp_thing:CicNotationPp.pp_term
~domain_of_thing:domain_of_term
- ~interpretate_thing:interpretate_term
+ ~interpretate_thing:(interpretate_term (?create_dummy_ids:None))
~refine_thing:refine_term (text,prefix_len,term)
let disambiguate_obj ?(fresh_instances=false) ~dbd ~aliases ~universe ~uri