From 32f5e926ed646fcdba6ae45141d2a6d5b3ae738a Mon Sep 17 00:00:00 2001 From: herbelin Date: Wed, 25 Oct 2006 21:37:37 +0000 Subject: Applatissement des noeuds application vide dans le filtrage Ltac (ex: None ne filtrait pas None à cause d'un PApp parasite) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9280 85f007b7-540e-0410-9357-904b9bb8a0f7 --- pretyping/matching.ml | 2 ++ test-suite/success/ltac.v | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/pretyping/matching.ml b/pretyping/matching.ml index 9f580b851d..cac06d2408 100644 --- a/pretyping/matching.ml +++ b/pretyping/matching.ml @@ -119,6 +119,8 @@ let matches_core convert allow_partial_app pat c = | PSort (RType _), Sort (Type _) -> sigma + | PApp (p, [||]), _ -> sorec stk sigma p t + | PApp (PApp (h, a1), a2), _ -> sorec stk sigma (PApp(h,Array.append a1 a2)) t diff --git a/test-suite/success/ltac.v b/test-suite/success/ltac.v index 9eb5dda721..3f25f70354 100644 --- a/test-suite/success/ltac.v +++ b/test-suite/success/ltac.v @@ -168,3 +168,10 @@ Goal forall a b c, a=0 -> b=c+a. intros. revert a b c H. Abort. + +(* Used to fail until revision 9280 because of a parasitic App node with + empty args *) + +Goal True. +match None with @None => exact I end. +Abort. -- cgit v1.2.3