src/containers/types/binary_heap.bend

bend-collections-laws-containers@1.0.0.0 · 20 lines · 0 definitions

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