diff options
| author | pboutill | 2012-05-15 11:54:01 +0000 |
|---|---|---|
| committer | pboutill | 2012-05-15 11:54:01 +0000 |
| commit | 98e8b75b640c93abc63140ce1fc3dc445d775066 (patch) | |
| tree | d3413ad4e4189c653f8a12ae815e8260c58a2eb3 /interp/notation.ml | |
| parent | 2ca3e39dbcdd07d6bc777f1514999109827a2410 (diff) | |
Notations are back in the "in" clause of pattern matching.
Fixes the test-suite.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15324 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'interp/notation.ml')
| -rw-r--r-- | interp/notation.ml | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/interp/notation.ml b/interp/notation.ml index 102d42c213..72a7138669 100644 --- a/interp/notation.ml +++ b/interp/notation.ml @@ -387,6 +387,9 @@ let uninterp_notations c = let uninterp_cases_pattern_notations c = Gmapl.find (cases_pattern_key c) !notations_key_table +let uninterp_ind_pattern_notations ind = + Gmapl.find (RefKey (canonical_gr (IndRef ind))) !notations_key_table + let availability_of_notation (ntn_scope,ntn) scopes = let f scope = Gmap.mem ntn (Gmap.find scope !scope_map).notations in @@ -401,6 +404,20 @@ let uninterp_prim_token c = | Some n -> (sc,n) with Not_found -> raise No_match +let uninterp_prim_token_ind_pattern ind args = + let ref = IndRef ind in + try + let (sc,numpr,b) = Hashtbl.find prim_token_key_table + (RefKey (canonical_gr ref)) in + if not b then raise No_match; + let args' = List.map + (fun x -> snd (glob_constr_of_closed_cases_pattern x)) args in + let ref = GRef (dummy_loc,ref) in + match numpr (GApp (dummy_loc,ref,args')) with + | None -> raise No_match + | Some n -> (sc,n) + with Not_found -> raise No_match + let uninterp_prim_token_cases_pattern c = try let k = cases_pattern_key c in |
