src/containers/types/stack.bend
1import Base
2
3# Neutral datatypes shared by src/stack.bend and spec/stack.bend.
4
5type Error is Data:
6 EmptyStack{}
7
8type Op<-T: Data> is Data:
9 Length{}
10 Push{value: T}
11 Pop{}
12 Peek{}
13 ToList{}
14
15type Obs<-T: Data> is Data:
16 ONat{value: Nat}
17 OItem{result: Result<&2, &2, Error, T>}
18 OUnit{}
19 OList{items: List<&2, T>}