Import Upstream version 20180207
[hcoop/debian/mlton.git] / basis-library / primitive / prim-basis.sml
CommitLineData
7f918cf1
CE
1(* Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh
2 * Jagannathan, and Stephen Weeks.
3 * Copyright (C) 1997-2000 NEC Research Institute.
4 *
5 * MLton is released under a BSD-style license.
6 * See the file MLton-LICENSE for details.
7 *)
8
9structure Primitive = struct
10
11(* Primitive Basis (Definition) *)
12structure Bool =
13 struct
14 datatype t = datatype bool
15 datatype bool = datatype t
16 end
17structure Exn =
18 struct
19 type t = exn
20 type exn = t
21 exception Bind = Bind
22 exception Match = Match
23 exception PrimOverflow = Overflow
24 end
25structure List =
26 struct
27 datatype t = datatype list
28 datatype list = datatype t
29 end
30structure Ref =
31 struct
32 datatype t = datatype ref
33 datatype ref = datatype t
34 end
35structure Unit =
36 struct
37 type t = unit
38 type unit = t
39 end
40
41(* Primitive Basis (Basis Library) *)
42structure Array =
43 struct
44 type 'a t = 'a array
45 type 'a array = 'a t
46 end
47structure Vector =
48 struct
49 type 'a t = 'a vector
50 type 'a vector = 'a t
51 end
52
53(* Primitive Basis (Primitive Types) *)
54structure Char8 =
55 struct
56 type t = char8
57 type char = t
58 end
59structure Char16 =
60 struct
61 type t = char16
62 type char = t
63 end
64structure Char32 =
65 struct
66 type t = char32
67 type char = t
68 end
69
70structure Int1 =
71 struct
72 type t = int1
73 type int = t
74 end
75structure Int2 =
76 struct
77 type t = int2
78 type int = t
79 end
80structure Int3 =
81 struct
82 type t = int3
83 type int = t
84 end
85structure Int4 =
86 struct
87 type t = int4
88 type int = t
89 end
90structure Int5 =
91 struct
92 type t = int5
93 type int = t
94 end
95structure Int6 =
96 struct
97 type t = int6
98 type int = t
99 end
100structure Int7 =
101 struct
102 type t = int7
103 type int = t
104 end
105structure Int8 =
106 struct
107 type t = int8
108 type int = t
109 end
110structure Int9 =
111 struct
112 type t = int9
113 type int = t
114 end
115structure Int10 =
116 struct
117 type t = int10
118 type int = t
119 end
120structure Int11 =
121 struct
122 type t = int11
123 type int = t
124 end
125structure Int12 =
126 struct
127 type t = int12
128 type int = t
129 end
130structure Int13 =
131 struct
132 type t = int13
133 type int = t
134 end
135structure Int14 =
136 struct
137 type t = int14
138 type int = t
139 end
140structure Int15 =
141 struct
142 type t = int15
143 type int = t
144 end
145structure Int16 =
146 struct
147 type t = int16
148 type int = t
149 end
150structure Int17 =
151 struct
152 type t = int17
153 type int = t
154 end
155structure Int18 =
156 struct
157 type t = int18
158 type int = t
159 end
160structure Int19 =
161 struct
162 type t = int19
163 type int = t
164 end
165structure Int20 =
166 struct
167 type t = int20
168 type int = t
169 end
170structure Int21 =
171 struct
172 type t = int21
173 type int = t
174 end
175structure Int22 =
176 struct
177 type t = int22
178 type int = t
179 end
180structure Int23 =
181 struct
182 type t = int23
183 type int = t
184 end
185structure Int24 =
186 struct
187 type t = int24
188 type int = t
189 end
190structure Int25 =
191 struct
192 type t = int25
193 type int = t
194 end
195structure Int26 =
196 struct
197 type t = int26
198 type int = t
199 end
200structure Int27 =
201 struct
202 type t = int27
203 type int = t
204 end
205structure Int28 =
206 struct
207 type t = int28
208 type int = t
209 end
210structure Int29 =
211 struct
212 type t = int29
213 type int = t
214 end
215structure Int30 =
216 struct
217 type t = int30
218 type int = t
219 end
220structure Int31 =
221 struct
222 type t = int31
223 type int = t
224 end
225structure Int32 =
226 struct
227 type t = int32
228 type int = t
229 end
230structure Int64 =
231 struct
232 type t = int64
233 type int = t
234 end
235structure IntInf =
236 struct
237 type t = intInf
238 type int = t
239 end
240
241structure Real32 =
242 struct
243 type t = real32
244 type real = t
245 end
246structure Real64 =
247 struct
248 type t = real64
249 type real = t
250 end
251
252structure String8 =
253 struct
254 type t = Char8.t vector
255 type string = t
256 end
257structure String16 =
258 struct
259 type t = Char16.t vector
260 type string = t
261 end
262structure String32 =
263 struct
264 type t = Char32.t vector
265 type string = t
266 end
267
268structure Word1 =
269 struct
270 type t = word1
271 type word = t
272 end
273structure Word2 =
274 struct
275 type t = word2
276 type word = t
277 end
278structure Word3 =
279 struct
280 type t = word3
281 type word = t
282 end
283structure Word4 =
284 struct
285 type t = word4
286 type word = t
287 end
288structure Word5 =
289 struct
290 type t = word5
291 type word = t
292 end
293structure Word6 =
294 struct
295 type t = word6
296 type word = t
297 end
298structure Word7 =
299 struct
300 type t = word7
301 type word = t
302 end
303structure Word8 =
304 struct
305 type t = word8
306 type word = t
307 end
308structure Word9 =
309 struct
310 type t = word9
311 type word = t
312 end
313structure Word10 =
314 struct
315 type t = word10
316 type word = t
317 end
318structure Word11 =
319 struct
320 type t = word11
321 type word = t
322 end
323structure Word12 =
324 struct
325 type t = word12
326 type word = t
327 end
328structure Word13 =
329 struct
330 type t = word13
331 type word = t
332 end
333structure Word14 =
334 struct
335 type t = word14
336 type word = t
337 end
338structure Word15 =
339 struct
340 type t = word15
341 type word = t
342 end
343structure Word16 =
344 struct
345 type t = word16
346 type word = t
347 end
348structure Word17 =
349 struct
350 type t = word17
351 type word = t
352 end
353structure Word18 =
354 struct
355 type t = word18
356 type word = t
357 end
358structure Word19 =
359 struct
360 type t = word19
361 type word = t
362 end
363structure Word20 =
364 struct
365 type t = word20
366 type word = t
367 end
368structure Word21 =
369 struct
370 type t = word21
371 type word = t
372 end
373structure Word22 =
374 struct
375 type t = word22
376 type word = t
377 end
378structure Word23 =
379 struct
380 type t = word23
381 type word = t
382 end
383structure Word24 =
384 struct
385 type t = word24
386 type word = t
387 end
388structure Word25 =
389 struct
390 type t = word25
391 type word = t
392 end
393structure Word26 =
394 struct
395 type t = word26
396 type word = t
397 end
398structure Word27 =
399 struct
400 type t = word27
401 type word = t
402 end
403structure Word28 =
404 struct
405 type t = word28
406 type word = t
407 end
408structure Word29 =
409 struct
410 type t = word29
411 type word = t
412 end
413structure Word30 =
414 struct
415 type t = word30
416 type word = t
417 end
418structure Word31 =
419 struct
420 type t = word31
421 type word = t
422 end
423structure Word32 =
424 struct
425 type t = word32
426 type word = t
427 end
428structure Word64 =
429 struct
430 type t = word64
431 type word = t
432 end
433
434(* Primitive Basis (MLton Extensions) *)
435structure Pointer =
436 struct
437 type t = cpointer
438 end
439structure Thread =
440 struct
441 type t = thread
442 end
443structure Weak =
444 struct
445 type 'a t = 'a weak
446 end
447
448end
449
450(* Top-level bindings *)
451datatype bool = datatype Primitive.Bool.bool
452type exn = Primitive.Exn.exn
453datatype list = datatype Primitive.List.list
454datatype ref = datatype Primitive.Ref.ref
455type unit = Primitive.Unit.unit
456type 'a array = 'a Primitive.Array.array
457type 'a vector = 'a Primitive.Vector.vector