nCicEnvironment.cmi
nCicEnvironment.cmx: oCic2NCic.cmx nUri.cmx nReference.cmx nCic.cmx \
nCicEnvironment.cmi
-nCicTypeChecker.cmo: nCicUtils.cmi nCicSubstitution.cmi nCicReduction.cmi \
- nCicPp.cmi nCic.cmo nCicTypeChecker.cmi
-nCicTypeChecker.cmx: nCicUtils.cmx nCicSubstitution.cmx nCicReduction.cmx \
- nCicPp.cmx nCic.cmx nCicTypeChecker.cmi
+nCicTypeChecker.cmo: nUri.cmi nReference.cmi nCicUtils.cmi \
+ nCicSubstitution.cmi nCicReduction.cmi nCicPp.cmi nCicEnvironment.cmi \
+ nCic.cmo nCicTypeChecker.cmi
+nCicTypeChecker.cmx: nUri.cmx nReference.cmx nCicUtils.cmx \
+ nCicSubstitution.cmx nCicReduction.cmx nCicPp.cmx nCicEnvironment.cmx \
+ nCic.cmx nCicTypeChecker.cmi
oCicTypeChecker.cmo: oCic2NCic.cmi nCicTypeChecker.cmi oCicTypeChecker.cmi
oCicTypeChecker.cmx: oCic2NCic.cmx nCicTypeChecker.cmx oCicTypeChecker.cmi
nCicUtils.cmo: nCic.cmo nCicUtils.cmi
with Not_found ->
let ouri = NUri.ouri_of_nuri u in
let o,_ =
- CicEnvironment.get_cooked_obj ~trust:false CicUniv.oblivion_ugraph
- ouri in
+ CicEnvironment.get_cooked_obj ~trust:false CicUniv.oblivion_ugraph ouri
+ in
(* FIX: add all objects to the environment and give back the last one *)
let no = HExtlib.list_last (OCic2NCic.convert_obj ouri o) in
NUri.UriHash.add cache u no;
no
;;
+let get_obj u =
+ try true, NUri.UriHash.find cache u
+ with Not_found ->
+ (* in th final implementation should get it from disk *)
+ let ouri = NUri.ouri_of_nuri u in
+ let o,_ =
+ CicEnvironment.get_cooked_obj ~trust:false CicUniv.oblivion_ugraph ouri
+ in
+ false, HExtlib.list_last (OCic2NCic.convert_obj ouri o)
+;;
+
let get_checked_def = function
| NReference.Ref (_, uri, NReference.Def) ->
(match get_checked_obj uri with
* functions strictly necessary to the typechecking algorithm *)
val get_checked_obj: NUri.uri -> NCic.obj
+val get_obj: NUri.uri -> bool * NCic.obj
val get_checked_def:
NReference.reference ->