From 2040379ec1d79ff588498ca6f20d8c7b75d74533 Mon Sep 17 00:00:00 2001 From: herbelin Date: Sun, 29 Jun 2008 14:57:58 +0000 Subject: Préférence donnée aux constantes qui ne sont pas des projections canoniques lors d'une unification constante/constante s'apprêtant à déplier l'une des deux constantes (suggestion des utilisateurs de structures canoniques), ceci afin de préserver des possibilités ultérieures de résolution d'evars par équipement en structure canonique. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11187 85f007b7-540e-0410-9357-904b9bb8a0f7 --- test-suite/success/CanonicalStructure.v | 17 +++++++++++++++++ test-suite/success/evars.v | 5 +++++ 2 files changed, 22 insertions(+) (limited to 'test-suite') diff --git a/test-suite/success/CanonicalStructure.v b/test-suite/success/CanonicalStructure.v index 44d21b83b..b8cae4719 100644 --- a/test-suite/success/CanonicalStructure.v +++ b/test-suite/success/CanonicalStructure.v @@ -12,3 +12,20 @@ Record Silly (X : Set) : Set := mkSilly { x : X }. Definition anotherMk := mkSilly. Definition struct := anotherMk nat 3. Canonical Structure struct. + +(* Intertwinning canonical structures and delta-expansion *) +(* Assia's short example *) + +Open Scope bool_scope. + +Set Implicit Arguments. + +Structure test_struct : Type := mk_test {dom :> Type; f : dom -> dom -> bool}. + +Notation " x != y":= (f _ x y)(at level 10). + +Canonical Structure bool_test := mk_test (fun x y => x || y). + +Definition b := bool. + +Check (fun x : b => x != x). diff --git a/test-suite/success/evars.v b/test-suite/success/evars.v index 082cbfbe1..3bc9c7f9e 100644 --- a/test-suite/success/evars.v +++ b/test-suite/success/evars.v @@ -198,6 +198,11 @@ Goal forall x : nat, F1 x -> G1 x. refine (fun x H => proj2 (_ x H) _). Abort. +(* First-order unification between beta-redex (is it useful ?) *) + +Check fun (y: (forall x:((fun y:Type => bool) nat), True)) + (z: (fun z:Type => bool) _) => y z. + (* Remark: the following example does not succeed any longer in 8.2 because, the algorithm is more general and does exclude a solution that it should exclude for typing reason. Handling of types and backtracking is still to -- cgit v1.2.3