Import Upstream version 20180207
[hcoop/debian/mlton.git] / lib / mlton / basic / ring.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 RING_STRUCTS =
9 sig
10 type t
11
12 val + : t * t -> t
13 val ~ : t -> t
14 val * : t * t -> t
15 val equals: t * t -> bool
16 val layout: t -> Layout.t
17 val zero: t
18 end
19
20 signature RING =
21 sig
22 include RING_STRUCTS
23
24 val - : t * t -> t
25 val double: t -> t
26 val isZero: t -> bool
27 val square: t -> t
28 val sum: t list -> t
29 end