diff options
| author | herbelin | 2008-10-11 18:35:31 +0000 |
|---|---|---|
| committer | herbelin | 2008-10-11 18:35:31 +0000 |
| commit | 76dfe2df5a5fc4623384a04610ba9f73030fee60 (patch) | |
| tree | fd2dca003e37beb1d4cfa6d21f655ccc0edbd8b5 /contrib/interface | |
| parent | 2e6c3a7b0b12cfd3b560de60f4918063f149fd01 (diff) | |
Backporting 11445 from 8.2 to trunk (negative conditions in
SearchAbout + referring objects by their notation).
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11446 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'contrib/interface')
| -rw-r--r-- | contrib/interface/centaur.ml4 | 6 | ||||
| -rw-r--r-- | contrib/interface/xlate.ml | 9 |
2 files changed, 10 insertions, 5 deletions
diff --git a/contrib/interface/centaur.ml4 b/contrib/interface/centaur.ml4 index a4dc0eacd3..e7c7fde8dd 100644 --- a/contrib/interface/centaur.ml4 +++ b/contrib/interface/centaur.ml4 @@ -546,7 +546,9 @@ let abort_hook s = output_results_nl (ctf_AbortedMessage !global_request_id s) let interp_search_about_item = function | SearchRef qid -> GlobSearchRef (Nametab.global qid) - | SearchString s -> GlobSearchString s + | SearchString (s,_) -> + warning "Notation case not taken into account"; + GlobSearchString s let pcoq_search s l = (* LEM: I don't understand why this is done in this way (redoing the @@ -559,7 +561,7 @@ let pcoq_search s l = begin match s with | SearchAbout sl -> raw_search_about (filter_by_module_from_list l) add_search - (List.map interp_search_about_item sl) + (List.map (on_snd interp_search_about_item) sl) | SearchPattern c -> let _,pat = interp_constrpattern Evd.empty (Global.env()) c in raw_pattern_search (filter_by_module_from_list l) add_search pat diff --git a/contrib/interface/xlate.ml b/contrib/interface/xlate.ml index 3421125369..8c470f1bd7 100644 --- a/contrib/interface/xlate.ml +++ b/contrib/interface/xlate.ml @@ -1944,12 +1944,15 @@ let rec xlate_vernac = | SearchRewrite c -> CT_search_rewrite(xlate_formula c, translated_restriction) | SearchAbout (a::l) -> - let xlate_search_about_item it = + let xlate_search_about_item (b,it) = + if not b then xlate_error "TODO: negative searchabout constraint"; match it with SearchRef x -> CT_coerce_ID_to_ID_OR_STRING(loc_qualid_to_ct_ID x) - | SearchString s -> - CT_coerce_STRING_to_ID_OR_STRING(CT_string s) in + | SearchString (s,None) -> + CT_coerce_STRING_to_ID_OR_STRING(CT_string s) + | SearchString (s,_) -> + xlate_error "TODO: notation with explicit scope" in CT_search_about (CT_id_or_string_ne_list(xlate_search_about_item a, List.map xlate_search_about_item l), |
