aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/searchstack.mli
blob: 6c81a2a9c94277bb7a98595e73f582dbc7ab5b22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
(************************************************************************)
(*  v      *   The Coq Proof Assistant  /  The Coq Development Team     *)
(* <O___,, *   INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2010     *)
(*   \VV/  **************************************************************)
(*    //   *      This file is distributed under the terms of the       *)
(*         *       GNU Lesser General Public License Version 2.1        *)
(************************************************************************)

type 'a t
type ('a,'b) search = [ `Stop of 'b | `Cont of 'a ]

val create : unit -> 'a t
val push : 'a -> 'a t -> unit
val find : ('c -> 'a -> ('c, 'b) search) -> 'c -> 'a t -> 'b
val is_empty : 'a t -> bool
val iter : ('a -> unit) -> 'a t -> unit
val clear : 'a t -> unit
val length : 'a t -> int

(* may raise Stack.Empty *)
val pop  : 'a t -> 'a
val top  : 'a t -> 'a

(* Extra *)
val to_list : 'a t -> 'a list