Commit | Line | Data |
---|---|---|
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 | ||
10 | signature AST_MODULES_STRUCTS = | |
11 | sig | |
12 | include AST_ATOMS_STRUCTS | |
13 | end | |
14 | ||
15 | signature AST_MODULES = | |
16 | sig | |
17 | include AST_CORE | |
18 | ||
19 | structure WhereEquation: | |
20 | sig | |
21 | type t | |
22 | datatype node = | |
23 | Type of {longtycon: Longtycon.t, | |
24 | tyvars: Tyvar.t vector, | |
25 | ty: Type.t} | |
26 | include WRAPPED sharing type node' = node | |
27 | sharing type obj = t | |
28 | end | |
29 | ||
30 | structure Sigexp: | |
31 | sig | |
32 | type spec | |
33 | ||
34 | type t | |
35 | datatype node = | |
36 | Spec of spec | |
37 | | Var of Sigid.t | |
38 | | Where of {equations: WhereEquation.t vector, | |
39 | sigexp: t} | |
40 | ||
41 | include WRAPPED sharing type node' = node | |
42 | sharing type obj = t | |
43 | ||
44 | val wheree: t * WhereEquation.t vector -> t | |
45 | val spec: spec -> t | |
46 | ||
47 | val layout: t -> Layout.t | |
48 | end | |
49 | ||
50 | structure SigConst: | |
51 | sig | |
52 | datatype t = | |
53 | None | |
54 | | Opaque of Sigexp.t | |
55 | | Transparent of Sigexp.t | |
56 | end | |
57 | ||
58 | structure SharingEquation: | |
59 | sig | |
60 | type t | |
61 | datatype node = | |
62 | Structure of Longstrid.t list | |
63 | | Type of Longtycon.t list | |
64 | include WRAPPED sharing type node' = node | |
65 | sharing type obj = t | |
66 | end | |
67 | ||
68 | structure Spec: | |
69 | sig | |
70 | type t | |
71 | datatype node = | |
72 | Datatype of DatatypeRhs.t | |
73 | | Eqtype of {tycon: Tycon.t, | |
74 | tyvars: Tyvar.t vector} vector | |
75 | | Empty | |
76 | | Exception of (Con.t * Type.t option) vector | |
77 | | IncludeSigexp of Sigexp.t | |
78 | | IncludeSigids of Sigid.t vector | |
79 | | Seq of t * t | |
80 | | Sharing of {equation: SharingEquation.t, | |
81 | spec: t} | |
82 | | Structure of (Strid.t * Sigexp.t) vector | |
83 | | Type of {tycon: Tycon.t, | |
84 | tyvars: Tyvar.t vector} vector | |
85 | | TypeDefs of TypBind.t | |
86 | | Val of (Var.t * Type.t) vector | |
87 | ||
88 | include WRAPPED sharing type node' = node | |
89 | sharing type obj = t | |
90 | ||
91 | val layout: t -> Layout.t | |
92 | end | |
93 | sharing type Spec.t = Sigexp.spec | |
94 | ||
95 | structure Strexp: | |
96 | sig | |
97 | type strdec | |
98 | ||
99 | type t | |
100 | datatype node = | |
101 | App of Fctid.t * t | |
102 | | Constrained of t * SigConst.t | |
103 | | Let of strdec * t | |
104 | | Struct of strdec | |
105 | | Var of Longstrid.t | |
106 | ||
107 | include WRAPPED sharing type node' = node | |
108 | sharing type obj = t | |
109 | ||
110 | val constrained: t * SigConst.t -> t | |
111 | val lett: strdec * t -> t | |
112 | val var: Longstrid.t -> t | |
113 | ||
114 | val layout: t -> Layout.t | |
115 | end | |
116 | ||
117 | structure Strdec: | |
118 | sig | |
119 | type t | |
120 | datatype node = | |
121 | Core of Dec.t | |
122 | | Local of t * t | |
123 | | Seq of t list | |
124 | | ShowBasis of File.t | |
125 | | Structure of {constraint: SigConst.t, | |
126 | def: Strexp.t, | |
127 | name: Strid.t} vector | |
128 | ||
129 | include WRAPPED sharing type node' = node | |
130 | sharing type obj = t | |
131 | ||
132 | val coalesce: t -> t | |
133 | val core: Dec.t -> t | |
134 | val layout: t -> Layout.t | |
135 | val openn: Longstrid.t vector -> t | |
136 | val structuree: {constraint: SigConst.t, | |
137 | def: Strexp.t, | |
138 | name: Strid.t} -> t | |
139 | end | |
140 | sharing type Strdec.t = Strexp.strdec | |
141 | ||
142 | structure FctArg: | |
143 | sig | |
144 | type t | |
145 | datatype node = | |
146 | Structure of Strid.t * Sigexp.t | |
147 | | Spec of Spec.t | |
148 | include WRAPPED sharing type node' = node | |
149 | sharing type obj = t | |
150 | end | |
151 | ||
152 | structure Topdec: | |
153 | sig | |
154 | type t | |
155 | datatype node = | |
156 | Functor of {arg: FctArg.t, | |
157 | body: Strexp.t, | |
158 | name: Fctid.t, | |
159 | result: SigConst.t} vector | |
160 | | Signature of (Sigid.t * Sigexp.t) vector | |
161 | | Strdec of Strdec.t | |
162 | ||
163 | include WRAPPED sharing type node' = node | |
164 | sharing type obj = t | |
165 | ||
166 | val checkSyntax: t -> unit | |
167 | val fromExp: Exp.t -> t | |
168 | val layout: t -> Layout.t | |
169 | end | |
170 | end |