From 9ff2c9d8d042c9989b6a8138c308398c49ae116f Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Tue, 23 Jun 2015 10:12:41 +0200 Subject: LtacProf for Coq trunk This add LtacProfiling. Much of the code was written by Tobias Tebbi (@tebbi), and Paul A. Steckler was invaluable in porting the code to Coq v8.5 and Coq trunk. --- library/declaremods.ml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'library/declaremods.ml') diff --git a/library/declaremods.ml b/library/declaremods.ml index f3f734aa0..dcd63c769 100644 --- a/library/declaremods.ml +++ b/library/declaremods.ml @@ -897,7 +897,13 @@ let start_library dir = Lib.start_compilation dir mp; Lib.add_frozen_state () +let end_library_hook = ref ignore +let append_end_library_hook f = + let old_f = !end_library_hook in + end_library_hook := fun () -> old_f(); f () + let end_library ?except dir = + !end_library_hook(); let oname = Lib.end_compilation_checks dir in let mp,cenv,ast = Global.export ?except dir in let prefix, lib_stack = Lib.end_compilation oname in -- cgit v1.2.3