Import Upstream version 20180207
[hcoop/debian/mlton.git] / lib / mlton / basic / sum.sig
CommitLineData
7f918cf1
CE
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
8signature SUM_STRUCTS =
9 sig
10 structure X: T
11 structure Y: T
12 end
13
14signature SUM =
15 sig
16 include SUM_STRUCTS
17
18 datatype t =
19 X of X.t
20 | Y of Y.t
21
22 val equals: t * t -> bool
23 val layout: t -> Layout.t
24 val map: t * (X.t -> 'a) * (Y.t -> 'a) -> 'a
25 val outX: t -> X.t
26 val outY: t -> Y.t
27 end