aboutsummaryrefslogtreecommitdiff
path: root/plugins/ltac/tacinterp.ml
diff options
context:
space:
mode:
authorMaxime Dénès2017-08-29 14:45:47 +0200
committerMaxime Dénès2017-08-29 14:45:47 +0200
commit7caaf8d434499feb1c3b3c86ad1538905fc34d3f (patch)
treeb83067ea7085d119593fce282a7bf756de402825 /plugins/ltac/tacinterp.ml
parentc3bc1fda9c5dd1805b23d04f2dee711aeec1f4a1 (diff)
parent569a26809a3b5e72033aac29e9e2bc91f74f2092 (diff)
Merge PR #946: Functional pretyping interface
Diffstat (limited to 'plugins/ltac/tacinterp.ml')
-rw-r--r--plugins/ltac/tacinterp.ml14
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/ltac/tacinterp.ml b/plugins/ltac/tacinterp.ml
index d3e625e73a..51eed2f4ec 100644
--- a/plugins/ltac/tacinterp.ml
+++ b/plugins/ltac/tacinterp.ml
@@ -1108,6 +1108,20 @@ let rec read_match_rule lfun ist env sigma = function
:: read_match_rule lfun ist env sigma tl
| [] -> []
+(* Fully evaluate an untyped constr *)
+let type_uconstr ?(flags = {(constr_flags ()) with use_hook = None })
+ ?(expected_type = WithoutTypeConstraint) ist c =
+ begin fun env sigma ->
+ let { closure; term } = c in
+ let vars = {
+ ltac_constrs = closure.typed;
+ ltac_uconstrs = closure.untyped;
+ ltac_idents = closure.idents;
+ ltac_genargs = Id.Map.empty;
+ } in
+ understand_ltac flags env sigma vars expected_type term
+ end
+
let warn_deprecated_info =
CWarnings.create ~name:"deprecated-info-tactical" ~category:"deprecated"
(fun () ->