diff options
author | 2013-05-12 15:33:40 +0000 | |
---|---|---|
committer | 2013-05-12 15:33:40 +0000 | |
commit | de26e97cf37cafd37b83377d2df062a6e82676e7 (patch) | |
tree | 1f093c94b7cb8ab59f301b9c5ee7ca712aa9fa0f /plugins/extraction/table.ml | |
parent | 9a9a8ab4c2a07aa8faa04f50d6250930220b5be5 (diff) |
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
Diffstat (limited to 'plugins/extraction/table.ml')
-rw-r--r-- | plugins/extraction/table.ml | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/extraction/table.ml b/plugins/extraction/table.ml index ebe7230ec..581735736 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])); |