comparison final_pre/src/AgdaInterface.agda @ 7:28f900230c26

add final_pre
author ryokka
date Mon, 19 Feb 2018 23:32:24 +0900
parents
children c8bfe73b2faf
comparison
equal deleted inserted replaced
6:d927f6b3d2b3 7:28f900230c26
1 record Stack {n m : Level } (a : Set n ) {t : Set m } (si : Set n ) : Set (m Level.⊔ n) where
2 field
3 stack : si
4 stackMethods : StackMethods {n} {m} a {t} si
5 pushStack : a -> (Stack a si -> t) -> t
6 pushStack d next = push (stackMethods ) (stack ) d (\s1 -> next (record {stack = s1 ; stackMethods = stackMethods } ))
7 popStack : (Stack a si -> Maybe a -> t) -> t
8 popStack next = pop (stackMethods ) (stack ) (\s1 d1 -> next (record {stack = s1 ; stackMethods = stackMethods }) d1 )
9
10 -- 以下省略