From 6b649aba925b6f7462da07599fe67ebb12a3460e Mon Sep 17 00:00:00 2001 From: Samuel Mimram Date: Wed, 28 Jul 2004 21:54:47 +0000 Subject: Imported Upstream version 8.0pl1 --- library/dischargedhypsmap.ml | 60 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 library/dischargedhypsmap.ml (limited to 'library/dischargedhypsmap.ml') diff --git a/library/dischargedhypsmap.ml b/library/dischargedhypsmap.ml new file mode 100644 index 00000000..59a01d81 --- /dev/null +++ b/library/dischargedhypsmap.ml @@ -0,0 +1,60 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* cache_discharged_hyps_map); + export_function = (fun x -> Some x) } + +let set_discharged_hyps sp hyps = + add_anonymous_leaf (in_discharged_hyps_map (sp,hyps)) + +let get_discharged_hyps sp = + try + Spmap.find sp !discharged_hyps_map + with Not_found -> + anomaly ("No discharged hypothesis for object " ^ string_of_path sp) + +(*s Registration as global tables and rollback. *) + +let init () = + discharged_hyps_map := Spmap.empty + +let freeze () = !discharged_hyps_map + +let unfreeze dhm = discharged_hyps_map := dhm + +let _ = + Summary.declare_summary "discharged_hypothesis" + { Summary.freeze_function = freeze; + Summary.unfreeze_function = unfreeze; + Summary.init_function = init; + Summary.survive_module = false; + Summary.survive_section = true } -- cgit v1.2.3