diff options
| author | Emilio Jesus Gallego Arias | 2020-03-10 03:41:20 -0400 |
|---|---|---|
| committer | Emilio Jesus Gallego Arias | 2020-03-10 03:41:20 -0400 |
| commit | 4e5ed2d6ba574ee6449e511dc27e8da32331dd07 (patch) | |
| tree | 1c01577abed111554976fe7127f90b4fc994c8fe /clib/cStack.ml | |
| parent | bab342d98d413a2b7a20da98c8dbec7616f54bce (diff) | |
[clib] Remove module CStack
This is only used in `Ccalgo` and it does not provide any advantage
these days over the upstream OCaml implementation.
Diffstat (limited to 'clib/cStack.ml')
| -rw-r--r-- | clib/cStack.ml | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/clib/cStack.ml b/clib/cStack.ml deleted file mode 100644 index 0432e29fad..0000000000 --- a/clib/cStack.ml +++ /dev/null @@ -1,44 +0,0 @@ -(************************************************************************) -(* * The Coq Proof Assistant / The Coq Development Team *) -(* v * INRIA, CNRS and contributors - Copyright 1999-2019 *) -(* <O___,, * (see CREDITS file for the list of authors) *) -(* \VV/ **************************************************************) -(* // * This file is distributed under the terms of the *) -(* * GNU Lesser General Public License Version 2.1 *) -(* * (see LICENSE file for the text of the license) *) -(************************************************************************) - -exception Empty = Stack.Empty - -type 'a t = { - mutable stack : 'a list; -} - -let create () = { stack = [] } - -let push x s = s.stack <- x :: s.stack - -let pop = function - | { stack = [] } -> raise Stack.Empty - | { stack = x::xs } as s -> s.stack <- xs; x - -let top = function - | { stack = [] } -> raise Stack.Empty - | { stack = x::_ } -> x - -let to_list { stack = s } = s - -let find f s = List.find f (to_list s) - -let find_map f s = CList.find_map f s.stack - -let fold_until f accu s = CList.fold_left_until f accu s.stack - -let is_empty { stack = s } = s = [] - -let iter f { stack = s } = List.iter f s - -let clear s = s.stack <- [] - -let length { stack = s } = List.length s - |
