| _ -> assert false
;;
-let refine_term metasenv subst context uri ~use_coercions:_ term _ ~localization_tbl =
+let refine_term
+ metasenv subst context uri ~coercion_db ~use_coercions term _ ~localization_tbl=
assert (uri=None);
debug_print (lazy (sprintf "TEST_INTERPRETATION: %s"
(NCicPp.ppterm ~metasenv ~subst ~context term)));
assert false
in
let metasenv, subst, term, _ =
- NCicRefiner.typeof metasenv subst context term None ~localise
+ NCicRefiner.typeof
+ ~look_for_coercion:(
+ if use_coercions then
+ NCicCoercion.look_for_coercion coercion_db
+ else (fun _ _ _ _ _ -> []))
+ metasenv subst context term None ~localise
in
Disambiguate.Ok (term, metasenv, subst, ())
with
let disambiguate_term ~context ~metasenv ~subst ?goal
~mk_implicit ~description_of_alias ~mk_choice
- ~aliases ~universe ~lookup_in_library
+ ~aliases ~universe ~coercion_db ~lookup_in_library
(text,prefix_len,term)
=
let mk_localization_tbl x = NCicUntrusted.NCicHash.create x in
~passes:(MultiPassDisambiguator.passes ())
~lookup_in_library ~domain_of_thing:domain_of_term
~interpretate_thing:(interpretate_term ~mk_choice (?create_dummy_ids:None))
- ~refine_thing:refine_term (text,prefix_len,term)
+ ~refine_thing:(refine_term ~coercion_db) (text,prefix_len,term)
~mk_localization_tbl ~hint ~subst
in
List.map (function (a,b,c,d,_) -> a,b,c,d) res, b