annotate src/AgdaTreeImpl.agda.replaced @ 1:73127e0ab57c

(none)
author soto@cr.ie.u-ryukyu.ac.jp
date Tue, 08 Sep 2020 18:38:08 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
soto@cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
1 record TreeMethods {n m : Level } {a : Set n } {t : Set m } (treeImpl : Set n ) : Set (m Level.@$\sqcup$@ n) where
soto@cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
2 field
soto@cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
3 putImpl : treeImpl @$\rightarrow$@ a @$\rightarrow$@ (treeImpl @$\rightarrow$@ t) @$\rightarrow$@ t
soto@cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
4 getImpl : treeImpl @$\rightarrow$@ (treeImpl @$\rightarrow$@ Maybe a @$\rightarrow$@ t) @$\rightarrow$@ t
soto@cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
5
soto@cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
6 record Tree {n m : Level } {a : Set n } {t : Set m } (treeImpl : Set n ) : Set (m Level.@$\sqcup$@ n) where
soto@cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
7 field
soto@cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
8 tree : treeImpl
soto@cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
9 treeMethods : TreeMethods {n} {m} {a} {t} treeImpl
soto@cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
10 putTree : a @$\rightarrow$@ (Tree treeImpl @$\rightarrow$@ t) @$\rightarrow$@ t
soto@cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
11 putTree d next = putImpl (treeMethods ) tree d (\t1 @$\rightarrow$@ next (record {tree = t1 ; treeMethods = treeMethods} ))
soto@cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
12 getTree : (Tree treeImpl @$\rightarrow$@ Maybe a @$\rightarrow$@ t) @$\rightarrow$@ t
soto@cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
13 getTree next = getImpl (treeMethods ) tree (\t1 d @$\rightarrow$@ next (record {tree = t1 ; treeMethods = treeMethods} ) d )
soto@cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
14