~ubuntu-branches/ubuntu/wily/agda/wily-proposed

« back to all changes in this revision

Viewing changes to test/succeed/Issue292.agda

  • Committer: Package Import Robot
  • Author(s): Iain Lane
  • Date: 2014-08-05 06:38:12 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20140805063812-io8e77niomivhd49
Tags: 2.4.0.2-1
* [6e140ac] Imported Upstream version 2.4.0.2
* [2049fc8] Update Build-Depends to match control
* [93dc4d4] Install the new primitives
* [e48f40f] Fix typo dev→doc

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
module Issue292 where
2
 
 
3
 
data ⊥ : Set where
4
 
 
5
 
infix 3 ¬_
6
 
 
7
 
¬_ : Set → Set
8
 
¬ P = P → ⊥
9
 
 
10
 
infix 4 _≅_
11
 
 
12
 
data _≅_ {A : Set} (x : A) : ∀ {B : Set} → B → Set where
13
 
  refl : x ≅ x
14
 
 
15
 
record Σ (A : Set) (B : A → Set) : Set where
16
 
  constructor _,_
17
 
  field
18
 
    proj₁ : A
19
 
    proj₂ : B proj₁
20
 
 
21
 
open Σ public
22
 
 
23
 
data Bool : Set where true false : Bool
24
 
 
25
 
data D : Bool -> Set where
26
 
  tt : D true
27
 
  ff : D false
28
 
 
29
 
P : Set -> Set
30
 
P S = Σ S (\s → s ≅ tt)
31
 
 
32
 
pbool : P (D true)
33
 
pbool = tt , refl
34
 
 
35
 
¬pbool2 : ¬ P (D false)
36
 
¬pbool2 ( ff , () )
37
 
{- WAS: expected error
38
 
ff ≅ tt should be empty, but that's not obvious to me
39
 
when checking that the clause ¬pbool2 (ff , ()) has type
40
 
¬ P (D false)
41
 
-}