aboutsummaryrefslogtreecommitdiffhomepage
path: root/pretyping/glob_ops.ml
diff options
context:
space:
mode:
authorGravatar Arnaud Spiwack <arnaud@spiwack.net>2014-11-07 18:38:12 +0100
committerGravatar Arnaud Spiwack <arnaud@spiwack.net>2014-11-19 10:11:45 +0100
commitfc2476e4a29592dcf2860a16d3a7c0aeeb4bffac (patch)
tree0fbe3e51ea0fd8e68e9f555fdc52a18bc2cf417c /pretyping/glob_ops.ml
parent7232e8f3fc5237705b80a870a6a3ad1a4748b838 (diff)
Printing function for [uconstr].
The core is a "detyping" function for [closed_glob_constr]. Which interpretes the variable names according to the Ltac context, and apply the standard detyping procedure to typed terms in the closure.
Diffstat (limited to 'pretyping/glob_ops.ml')
-rw-r--r--pretyping/glob_ops.ml9
1 files changed, 9 insertions, 0 deletions
diff --git a/pretyping/glob_ops.ml b/pretyping/glob_ops.ml
index 588810eaa..4f54facf6 100644
--- a/pretyping/glob_ops.ml
+++ b/pretyping/glob_ops.ml
@@ -374,6 +374,15 @@ let map_pattern_binders f tomatch branches =
(** /mapping of names in binders *)
+let map_tomatch f (c,pp) : tomatch_tuple = f c , pp
+
+let map_cases_branch f (loc,il,cll,rhs) : cases_clause =
+ loc , il , cll , f rhs
+
+let map_pattern f tomatch branches =
+ List.map (fun tm -> map_tomatch f tm) tomatch,
+ List.map (fun br -> map_cases_branch f br) branches
+
let loc_of_glob_constr = function
| GRef (loc,_,_) -> loc
| GVar (loc,_) -> loc