Import Upstream version 20180207
[hcoop/debian/mlton.git] / lib / mlton / basic / doubly-linked.sig
1 (* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
2 * Jagannathan, and Stephen Weeks.
3 *
4 * MLton is released under a BSD-style license.
5 * See the file MLton-LICENSE for details.
6 *)
7
8 signature DOUBLY_LINKED_STRUCTS =
9 sig
10 type 'a t
11
12 val destruct : 'a t -> 'a t Pointer.t * 'a * 'a t Pointer.t
13 end
14
15 signature DOUBLY_LINKED =
16 sig
17 include DOUBLY_LINKED_STRUCTS
18
19 val eqPrev: 'a t * 'a t -> bool
20 val insertL: 'a t * 'a t -> unit
21 val insertR: 'a t * 'a t -> unit
22 val isLinked: 'a t -> bool
23 val link: 'a t * 'a t -> unit
24 val next: 'a t -> 'a t
25 val nextp: 'a t -> 'a t Pointer.t
26 val prev: 'a t -> 'a t
27 val prevp: 'a t -> 'a t Pointer.t
28 val setPrev: 'a t * 'a t -> unit
29 val setNext: 'a t * 'a t -> unit
30 val unlink: 'a t -> unit
31 val value: 'a t -> 'a
32 end