diff options
| author | herbelin | 2011-06-08 15:39:23 +0000 |
|---|---|---|
| committer | herbelin | 2011-06-08 15:39:23 +0000 |
| commit | da8f274d07acc80f95928979730bd390984aaf1b (patch) | |
| tree | 69e94b9e49742a0483766ebba38fccbd430e9f5c | |
| parent | 2d7c366bc0392bc68d622f4c0dc6734a2dc9ed6c (diff) | |
Make Notation works with anonymous-level "Type".
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14170 85f007b7-540e-0410-9357-904b9bb8a0f7
| -rw-r--r-- | interp/topconstr.ml | 1 | ||||
| -rw-r--r-- | test-suite/output/Notations.out | 2 | ||||
| -rw-r--r-- | test-suite/output/Notations.v | 8 |
3 files changed, 11 insertions, 0 deletions
diff --git a/interp/topconstr.ml b/interp/topconstr.ml index ab009e34ae..c492763b09 100644 --- a/interp/topconstr.ml +++ b/interp/topconstr.ml @@ -713,6 +713,7 @@ let rec match_ inner alp (tmetas,blmetas as metas) sigma a1 a2 = match_ true alp metas (match_ true alp metas sigma c1 c2) t1 t2 | GCast(_,c1, CastCoerce), ACast(c2, CastCoerce) -> match_ true alp metas sigma c1 c2 + | GSort (_,GType _), ASort (GType None) -> sigma | GSort (_,s1), ASort s2 when s1 = s2 -> sigma | GPatVar _, AHole _ -> (*Don't hide Metas, they bind in ltac*) raise No_match | a, AHole _ -> sigma diff --git a/test-suite/output/Notations.out b/test-suite/output/Notations.out index 215d9b68c5..72264d082b 100644 --- a/test-suite/output/Notations.out +++ b/test-suite/output/Notations.out @@ -120,3 +120,5 @@ fun x : option Z => match x with | NONE3 => 0 end : option Z -> Z +s + : s diff --git a/test-suite/output/Notations.v b/test-suite/output/Notations.v index b8f8f48f30..4a2c411ee0 100644 --- a/test-suite/output/Notations.v +++ b/test-suite/output/Notations.v @@ -245,3 +245,11 @@ Check (fun x => match x with SOME2 x => x | NONE2 => 0 end). Notation NONE3 := @None. Notation SOME3 := @Some. Check (fun x => match x with SOME3 x => x | NONE3 => 0 end). + +(* Check correct matching of "Type" in notations. Of course the + notation denotes a term that will be reinterpreted with a different + universe than the actual one; but it would be the same anyway + without a notation *) + +Notation s := Type. +Check s. |
