diff options
| author | letouzey | 2013-10-24 21:29:41 +0000 |
|---|---|---|
| committer | letouzey | 2013-10-24 21:29:41 +0000 |
| commit | 6da011a8677676462b24940a6171fb22615c3fbb (patch) | |
| tree | 0df385cc8b8d72b3465d7745d2b97283245c7ed5 /proofs | |
| parent | 133a2143413a723d1d4e3dead5ffa8458f61afa8 (diff) | |
More monomorphic List.mem + List.assoc + ...
To reduce the amount of syntactic noise, we now provide
a few inner modules Int.List, Id.List, String.List, Sorts.List
which contain some monomorphic (or semi-monomorphic) functions
such as mem, assoc, ...
NB: for Int.List.mem and co we reuse List.memq and so on.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16936 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'proofs')
| -rw-r--r-- | proofs/goal.ml | 6 | ||||
| -rw-r--r-- | proofs/logic.ml | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/proofs/goal.ml b/proofs/goal.ml index 48cce3fa74..7901ec0a57 100644 --- a/proofs/goal.ml +++ b/proofs/goal.ml @@ -429,8 +429,10 @@ let rename_hyp_sign id1 id2 sign = let rename_hyp id1 id2 env rdefs gl info = let hyps = hyps env rdefs gl info in if not (Names.Id.equal id1 id2) && - List.mem id2 (Termops.ids_of_named_context (Environ.named_context_of_val hyps)) then - Errors.error ((Names.Id.to_string id2)^" is already used."); + Names.Id.List.mem id2 + (Termops.ids_of_named_context (Environ.named_context_of_val hyps)) + then + Errors.error ((Names.Id.to_string id2)^" is already used."); let new_hyps = rename_hyp_sign id1 id2 hyps in let new_env = Environ.reset_with_named_context new_hyps env in let old_concl = concl env rdefs gl info in diff --git a/proofs/logic.ml b/proofs/logic.ml index 5a29c3b0ee..c848a45ab5 100644 --- a/proofs/logic.ml +++ b/proofs/logic.ml @@ -210,7 +210,7 @@ let reorder_val_context env sign ord = let check_decl_position env sign (x,_,_ as d) = let needed = global_vars_set_of_decl env d in let deps = dependency_closure env (named_context_of_val sign) needed in - if List.mem x deps then + if Id.List.mem x deps then error ("Cannot create self-referring hypothesis "^Id.to_string x); x::deps @@ -690,7 +690,9 @@ let prim_refiner r sigma goal = | Rename (id1,id2) -> if !check && not (Id.equal id1 id2) && - List.mem id2 (ids_of_named_context (named_context_of_val sign)) then + Id.List.mem id2 + (ids_of_named_context (named_context_of_val sign)) + then error ((Id.to_string id2)^" is already used."); let sign' = rename_hyp id1 id2 sign in let cl' = replace_vars [id1,mkVar id2] cl in |
