Import Upstream version 20180207
[hcoop/debian/mlton.git] / lib / mlton / basic / ring-with-identity.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 RING_WITH_IDENTITY_STRUCTS =
9 sig
10 include RING
11
12 val one: t
13 end
14
15signature RING_WITH_IDENTITY =
16 sig
17 include RING_WITH_IDENTITY_STRUCTS
18
19 val add1: t -> t
20 val dec: t ref -> unit
21 (* fromInt n = 1 + ... + 1, n times. *)
22 val fromInt: Pervasive.Int.int -> t
23 val fromIntInf: Pervasive.IntInf.int -> t
24 val inc: t ref -> unit
25 val negOne: t
26 val pow: t * Pervasive.Int.int -> t
27 val powInf : t * Pervasive.IntInf.int -> t
28 val pows: (t * Pervasive.Int.int) list -> t (* simultaneous exponentiation *)
29 val powsInf: (t * Pervasive.IntInf.int) list -> t
30 val prod: t list -> t
31 val sub1: t -> t
32 val three: t
33 val two: t
34 end