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

« back to all changes in this revision

Viewing changes to test/succeed/CoverStrategy.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 CoverStrategy where
2
 
 
3
 
import Common.Level
4
 
open import Common.Prelude renaming (Nat to ℕ)
5
 
 
6
 
data _∼_ : ℕ → ℕ → Set where
7
 
  pr : ∀ {n} → suc n ∼ n
8
 
  eq : ∀ {n} →     n ∼ n
9
 
 
10
 
max : ∀ {m n} → m ∼ n → ℕ
11
 
max (pr {n}) = suc n
12
 
max (eq {n}) =     n
13
 
 
14
 
data Tree : ℕ → Set where
15
 
  node : ∀ {hˡ hʳ} (bal : hˡ ∼ hʳ) → Tree (max bal)
16
 
 
17
 
test : ∀ {hˡ hʳ} → Tree hˡ → hˡ ∼ hʳ → Set
18
 
test (node pr) pr = ℕ
19
 
test (node eq) pr = ℕ
20
 
test x         eq = ℕ
21
 
 
22
 
{- We cannot split on 'Tree hˡ' if we have already split on 'hˡ ∼ hʳ'
23
 
bla : ∀ {hˡ hʳ} → Tree hˡ → hˡ ∼ hʳ → Set
24
 
bla nod pr = {!nod!}
25
 
bla nod eq = {!!}
26
 
-}
27