aboutsummaryrefslogtreecommitdiffhomepage
path: root/proofs/proofview.ml
diff options
context:
space:
mode:
authorGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2014-10-12 15:32:38 +0200
committerGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2014-10-13 19:12:34 +0200
commit267d7a63e9c24573226d0890bedb783f10dcb235 (patch)
tree9086f77abd7a96d89d9b9e9272ac4aa87f256223 /proofs/proofview.ml
parent9632987e1eb0b035c760ab293e785c752d5eac92 (diff)
Adding a tactic which fails if one of the goals under focus is dependent in another one.
Diffstat (limited to 'proofs/proofview.ml')
-rw-r--r--proofs/proofview.ml11
1 files changed, 11 insertions, 0 deletions
diff --git a/proofs/proofview.ml b/proofs/proofview.ml
index 04c084fb7..e19236df0 100644
--- a/proofs/proofview.ml
+++ b/proofs/proofview.ml
@@ -663,6 +663,17 @@ let shelve_unifiable =
Proof.set {initial with comb=n} >>
Proof.put (true,(u,[]))
+let check_no_dependencies =
+ let (>>=) = Proof.bind in
+ Proof.get >>= fun initial ->
+ let (u,n) = Goal.partition_unifiable initial.solution initial.comb in
+ match u with
+ | [] -> tclUNIT ()
+ | gls ->
+ let l = List.map (Goal.dependent_goal_ident initial.solution) gls in
+ let l = List.map (fun id -> Names.Name id) l in
+ tclZERO (Logic.RefinerError (Logic.UnresolvedBindings l))
+
(* [unshelve l p] adds all the goals in [l] at the end of the focused
goals of p *)
let unshelve l p =