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