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

« back to all changes in this revision

Viewing changes to test/succeed/Issue602.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
 
{-# OPTIONS --guardedness-preserving-type-constructors #-}
2
 
module Issue602 where
3
 
 
4
 
infixl 6 _⊔_
5
 
 
6
 
postulate
7
 
  Level : Set
8
 
  zero  : Level
9
 
  suc   : Level → Level
10
 
  _⊔_   : Level → Level → Level
11
 
 
12
 
{-# BUILTIN LEVEL     Level #-}
13
 
{-# BUILTIN LEVELZERO zero  #-}
14
 
{-# BUILTIN LEVELSUC  suc   #-}
15
 
{-# BUILTIN LEVELMAX  _⊔_   #-}
16
 
 
17
 
infix 1000 ♯_
18
 
 
19
 
postulate
20
 
  ∞  : ∀ {a} (A : Set a) → Set a
21
 
  ♯_ : ∀ {a} {A : Set a} → A → ∞ A
22
 
  ♭  : ∀ {a} {A : Set a} → ∞ A → A
23
 
 
24
 
{-# BUILTIN INFINITY ∞  #-}
25
 
{-# BUILTIN SHARP    ♯_ #-}
26
 
{-# BUILTIN FLAT     ♭  #-}
27
 
 
28
 
data CoNat : Set0 where
29
 
  z : CoNat
30
 
  s : ∞ CoNat → CoNat
31
 
 
32
 
record A : Set2 where
33
 
  field
34
 
    f : Set1
35
 
 
36
 
record B (a : ∞ A) : Set1 where
37
 
  field
38
 
    f : A.f (♭ a)
39
 
 
40
 
postulate
41
 
  a : A
42
 
 
43
 
e : CoNat → A
44
 
e z = a
45
 
e (s n) = record
46
 
  { f = B (♯ e (♭ n))
47
 
  }
 
 
b'\\ No newline at end of file'