aboutsummaryrefslogtreecommitdiff
path: root/pretyping
diff options
context:
space:
mode:
authorherbelin2002-05-30 14:16:33 +0000
committerherbelin2002-05-30 14:16:33 +0000
commit126fa723b61a811d1ab96edfba604d6c32ee68a4 (patch)
treea9d92c59e890123909e161258c145afdb062ea44 /pretyping
parent46f4caf6d8ac042638b668a5fa16294b420641ac (diff)
Mise au point de declare_red_expr
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@2736 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'pretyping')
-rw-r--r--pretyping/tacred.ml6
-rw-r--r--pretyping/tacred.mli4
2 files changed, 3 insertions, 7 deletions
diff --git a/pretyping/tacred.ml b/pretyping/tacred.ml
index 1242b84146..b42318a524 100644
--- a/pretyping/tacred.ml
+++ b/pretyping/tacred.ml
@@ -789,11 +789,9 @@ let make_flag f =
let red_expr_tab = ref Stringmap.empty
-type generic_reduction_function = constr -> reduction_function
-
let declare_red_expr s f =
try
- let _ = Stringmap.find s in
+ let _ = Stringmap.find s !red_expr_tab in
error ("There is already a reduction expression of name "^s)
with Not_found ->
red_expr_tab := Stringmap.add s f !red_expr_tab
@@ -807,7 +805,7 @@ let reduction_of_redexp = function
| Unfold ubinds -> unfoldn ubinds
| Fold cl -> fold_commands cl
| Pattern lp -> pattern_occs lp
- | ExtraRedExpr (s,c) -> Stringmap.find s !red_expr_tab c
+ | ExtraRedExpr (s,c) -> Stringmap.find s !red_expr_tab
(* Used in several tactics. *)
diff --git a/pretyping/tacred.mli b/pretyping/tacred.mli
index 0224a97685..1d801c5a4b 100644
--- a/pretyping/tacred.mli
+++ b/pretyping/tacred.mli
@@ -76,9 +76,7 @@ type red_expr = (constr, evaluable_global_reference) red_expr_gen
val reduction_of_redexp : red_expr -> reduction_function
-type generic_reduction_function = constr -> reduction_function
-
-val declare_red_expr : string -> generic_reduction_function -> unit
+val declare_red_expr : string -> reduction_function -> unit
(* Opaque and Transparent commands. *)
val set_opaque_const : section_path -> unit