Import Upstream version 20180207
[hcoop/debian/mlton.git] / lib / mlton / basic / property-list.sig
1 (* Copyright (C) 2009 Matthew Fluet.
2 * Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
3 * Jagannathan, and Stephen Weeks.
4 *
5 * MLton is released under a BSD-style license.
6 * See the file MLton-LICENSE for details.
7 *)
8
9 signature PROPERTY_LIST =
10 sig
11 type t
12
13 (* remove all properties from the list *)
14 val clear: t -> unit
15 (* pointer equality of property lists *)
16 val equals: t * t -> bool
17 val length: t -> int
18 (* create an empty property list *)
19 val new: unit -> t
20 (* create a new property *)
21 val newProperty:
22 unit -> {
23 (* See if a property is in a property list.
24 * NONE if it isn't.
25 *)
26 peek: t -> 'a option,
27 (* Add the value of the property -- must not already exist. *)
28 add: t * 'a -> unit,
29 (* Remove a property from a property list.
30 * Noop if the property isn't there.
31 *)
32 remove: t -> unit
33 }
34 val stats: unit -> Layout.t
35 end