src/containers/types/queue.bend
1import Base
2
3# Neutral datatypes shared by src/queue.bend and spec/queue.bend.
4
5type Error is Data:
6 EmptyQueue{}
7
8type Op<-T: Data> is Data:
9 Length{}
10 Enqueue{value: T}
11 Dequeue{}
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>}