Import Debian changes 20180207-1
[hcoop/debian/mlton.git] / mlton / atoms / prim-tycons.sig
CommitLineData
7f918cf1
CE
1(* Copyright (C) 2017 Matthew Fluet.
2 * Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh
3 * Jagannathan, and Stephen Weeks.
4 * Copyright (C) 1997-2000 NEC Research Institute.
5 *
6 * MLton is released under a BSD-style license.
7 * See the file MLton-LICENSE for details.
8 *)
9
10signature PRIM_TYCONS_SUBSTRUCTS =
11 sig
12 structure AdmitsEquality: ADMITS_EQUALITY
13 structure CharSize: CHAR_SIZE
14 structure IntSize: INT_SIZE
15 structure Kind: TYCON_KIND
16 structure RealSize: REAL_SIZE
17 structure WordSize: WORD_SIZE
18 end
19
20signature PRIM_TYCONS_STRUCTS =
21 sig
22 include PRIM_TYCONS_SUBSTRUCTS
23
24 type t
25
26 val fromString: string -> t
27 val equals: t * t -> bool
28 val layout: t -> Layout.t
29 end
30
31signature PRIM_TYCONS =
32 sig
33 include PRIM_TYCONS_SUBSTRUCTS
34
35 type tycon
36
37 val array: tycon
38 val arrow: tycon
39 val bool: tycon
40 val char: CharSize.t -> tycon
41 val cpointer: tycon
42 val deCharX: tycon -> CharSize.t
43 val defaultChar: unit -> tycon
44 val defaultInt: unit -> tycon
45 val defaultReal: unit -> tycon
46 val defaultWord: unit -> tycon
47 val deIntX: tycon -> IntSize.t option
48 val deRealX: tycon -> RealSize.t
49 val deWordX: tycon -> WordSize.t
50 val exn: tycon
51 val int: IntSize.t -> tycon
52 val ints: (tycon * IntSize.t) vector
53 val intInf: tycon
54 val isBool: tycon -> bool
55 val isCharX: tycon -> bool
56 val isCPointer: tycon -> bool
57 val isIntX: tycon -> bool
58 val isRealX: tycon -> bool
59 val isWordX: tycon -> bool
60 val layoutApp: tycon * Layout.t vector -> Layout.t
61 val list: tycon
62 val layoutAppPretty:
63 tycon
64 * LayoutPretty.t vector
65 * {layoutPretty: tycon -> Layout.t}
66 -> LayoutPretty.t
67 val layoutAppPrettyNormal:
68 Layout.t
69 * LayoutPretty.t vector
70 -> LayoutPretty.t
71 val prims: {admitsEquality: AdmitsEquality.t,
72 kind: Kind.t,
73 name: string,
74 tycon: tycon} list
75 val real: RealSize.t -> tycon
76 val reals: (tycon * RealSize.t) vector
77 val reff: tycon
78 val thread: tycon
79 val tuple: tycon
80 val vector: tycon
81 val weak: tycon
82 val word: WordSize.t -> tycon
83 val words: (tycon * WordSize.t) vector
84 end