From de26e97cf37cafd37b83377d2df062a6e82676e7 Mon Sep 17 00:00:00 2001 From: ppedrot Date: Sun, 12 May 2013 15:33:40 +0000 Subject: Use the Hook module here and there. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16510 85f007b7-540e-0410-9357-904b9bb8a0f7 --- plugins/extraction/table.ml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'plugins/extraction/table.ml') diff --git a/plugins/extraction/table.ml b/plugins/extraction/table.ml index ebe7230ec2..5817357362 100644 --- a/plugins/extraction/table.ml +++ b/plugins/extraction/table.ml @@ -755,8 +755,7 @@ let reset_extraction_blacklist () = Lib.add_anonymous_leaf (reset_blacklist ()) (*s Extract Constant/Inductive. *) (* UGLY HACK: to be defined in [extraction.ml] *) -let use_type_scheme_nb_args, register_type_scheme_nb_args = - let r = ref (fun _ _ -> 0) in (fun x y -> !r x y), (:=) r +let (use_type_scheme_nb_args, type_scheme_nb_args_hook) = Hook.make () let customs = Summary.ref Refmap'.empty ~name:"ExtrCustom" @@ -823,7 +822,7 @@ let extract_constant_inline inline r ids s = let typ = Reduction.whd_betadeltaiota env typ in if Reduction.is_arity env typ then begin - let nargs = use_type_scheme_nb_args env typ in + let nargs = Hook.get use_type_scheme_nb_args env typ in if List.length ids <> nargs then error_axiom_scheme g nargs end; Lib.add_anonymous_leaf (inline_extraction (inline,[g])); -- cgit v1.2.3