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

« back to all changes in this revision

Viewing changes to test/succeed/Issue747.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 Issue747 where
2
 
 
3
 
data ℕ : Set where
4
 
  O : ℕ
5
 
  S : ℕ → ℕ
6
 
 
7
 
record Σ (A : Set) (P : A → Set) : Set where
8
 
  field
9
 
    π₁ : A
10
 
    π₂ : P π₁
11
 
 
12
 
data _≡_ {A : Set} : A → A → Set where
13
 
  refl : (a : A) → a ≡ a
14
 
 
15
 
is-contr : Set → Set
16
 
is-contr A = Σ A (λ x → ((y : A) → y ≡ x))
17
 
 
18
 
is-hlevel : (n : ℕ) → (Set → Set)
19
 
is-hlevel O     A = is-contr A
20
 
is-hlevel (S n) A = (x y : A) → is-hlevel n (x ≡ y)
21
 
 
22
 
postulate
23
 
  t : ℕ → Set → Set
24
 
  t-is-hlevel : {n : ℕ} {A : Set} → is-hlevel n (t n A)
25
 
  A : Set
26
 
  f : (n : ℕ) (B : Set) ⦃ x : is-hlevel n B ⦄ → Set
27
 
 
28
 
g : (n : ℕ) → Set
29
 
g n = f n (t n A) {- ⦃ t-is-hlevel {n} ⦄ -}
30