Backport from sid to buster
[hcoop/debian/mlton.git] / lib / mlton / set / type.sig
1 (* Copyright (C) 1999-2006 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 TYPE =
9 sig
10 datatype set =
11 EmptySet
12 | Set of elt
13 and elt =
14 Base
15 | Pair of elt * elt
16 | EltSet of set
17
18 exception Incompatible
19
20 structure Set :
21 sig
22 type t sharing type t = set
23 val combine: t * t -> t
24 val areCompatible: t * t -> bool
25 end
26
27 structure Elt :
28 sig
29 type t sharing type t = elt
30 val combine: t * t -> t
31 val areCompatible: t * t -> bool
32 end
33
34 val combineSetElt: set * elt -> set
35 val areCompatibleSetElt: set * elt -> bool
36 end