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

« back to all changes in this revision

Viewing changes to test/succeed/Issue700.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 --sized-types #-}
2
 
module Issue700 where
3
 
 
4
 
import Common.Level
5
 
open import Common.Size
6
 
 
7
 
postulate
8
 
  Size< : Size → Set
9
 
{-# BUILTIN SIZELT Size< #-}
10
 
 
11
 
postulate
12
 
  A : Set
13
 
 
14
 
data T (i : Size) : Set where
15
 
  c : (j : Size< i) → T j → T _
16
 
 
17
 
bug : ∀ i → T i → A
18
 
bug i (c j x) = bug j x
19
 
 
20
 
{- WAS: de Bruijn index out of scope
21
 
 
22
 
Issue700.bug is projection like in argument 1 for type Issue700.T
23
 
Translated clause:
24
 
  delta = (j : Size< @0) (x : T j)
25
 
  perm  = x0,x1 -> x0,x1
26
 
  ps    = [r(ConP Issue700.T.c Nothing [r(VarP "j"),r(VarP "x")])]
27
 
  body  = Bind (Abs "h1" Bind (Abs "h2" Body (Def Issue700.bug [r(Var 1 []),r(Var 0 [])])))
28
 
  body  = [h1 h2] bug h1 h2
29
 
-}