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

« back to all changes in this revision

Viewing changes to test/succeed/Issue422.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
 
 
2
 
module Issue422 where
3
 
 
4
 
data Bool : Set where
5
 
  true false : Bool
6
 
 
7
 
data _≡_ {A : Set} (x : A) : A → Set where
8
 
  refl : x ≡ x
9
 
 
10
 
foo : Bool → Bool → Bool
11
 
foo true  b    = b
12
 
foo n      true = true
13
 
foo false b    = false
14
 
 
15
 
good : foo false true ≡ true
16
 
good = refl
17
 
 
18
 
data Nat : Set where
19
 
  zero : Nat
20
 
  suc  : Nat → Nat
21
 
 
22
 
data T : Set where
23
 
  t₁ : Nat → T
24
 
  t₂ : Nat → Nat → T
25
 
  t₃ : Nat → Nat → Nat → T
26
 
 
27
 
bar : Nat → Nat → Nat → T
28
 
bar x  zero    z      = t₂ x z
29
 
bar x  y      (suc z) = t₃ x y z
30
 
bar x (suc y)  zero   = t₂ x y
31
 
 
32
 
postulate
33
 
  a b c : Nat
34
 
 
35
 
eqn₁ : bar a zero c ≡ t₂ a c
36
 
eqn₁ = refl
37
 
 
38
 
eqn₂ : bar a (suc b) (suc c) ≡ t₃ a (suc b) c
39
 
eqn₂ = refl
40
 
 
41
 
eqn₃ : bar a (suc b) zero ≡ t₂ a b
42
 
eqn₃ = refl