| 1 |
(* fun-prio-queue.sig |
| 2 |
* 2004 Matthew Fluet ([email protected]) |
| 3 |
* Ported to MLton threads. |
| 4 |
*) |
| 5 |
|
| 6 |
signature FUN_PRIORITY_QUEUE_ARG = |
| 7 |
sig |
| 8 |
structure Key : |
| 9 |
sig |
| 10 |
type t |
| 11 |
val compare : t * t -> order |
| 12 |
end |
| 13 |
end |
| 14 |
|
| 15 |
signature FUN_PRIORITY_QUEUE = |
| 16 |
sig |
| 17 |
include FUN_PRIORITY_QUEUE_ARG |
| 18 |
|
| 19 |
structure Elt: |
| 20 |
sig |
| 21 |
type 'a t |
| 22 |
val key: 'a t -> Key.t |
| 23 |
val value: 'a t -> 'a |
| 24 |
end |
| 25 |
|
| 26 |
type 'a t |
| 27 |
|
| 28 |
val clean: 'a t * ('a Elt.t -> bool) -> 'a t |
| 29 |
val cleanAndDeque: 'a t * ('a Elt.t -> bool) -> 'a Elt.t option * 'a t |
| 30 |
val cleanPrefix: 'a t * ('a Elt.t -> bool) -> 'a t |
| 31 |
val deque: 'a t -> ('a Elt.t * 'a t) option |
| 32 |
val empty: 'a t -> bool |
| 33 |
val enque: 'a t * Key.t * 'a -> 'a t |
| 34 |
val enqueAndClean: 'a t * Key.t * 'a * ('a Elt.t -> bool) -> 'a t |
| 35 |
val new: unit -> 'a t |
| 36 |
val peek: 'a t -> 'a Elt.t option |
| 37 |
end |