Commit | Line | Data |
---|---|---|
7f918cf1 CE |
1 | UnsafeStructure |
2 | =============== | |
3 | ||
4 | This module is a subset of the `Unsafe` module provided by SML/NJ, | |
5 | with a few extract operations for `PackWord` and `PackReal`. | |
6 | ||
7 | [source,sml] | |
8 | ---- | |
9 | signature UNSAFE_MONO_ARRAY = | |
10 | sig | |
11 | type array | |
12 | type elem | |
13 | ||
14 | val create: int -> array | |
15 | val sub: array * int -> elem | |
16 | val update: array * int * elem -> unit | |
17 | end | |
18 | ||
19 | signature UNSAFE_MONO_VECTOR = | |
20 | sig | |
21 | type elem | |
22 | type vector | |
23 | ||
24 | val sub: vector * int -> elem | |
25 | end | |
26 | ||
27 | signature UNSAFE = | |
28 | sig | |
29 | structure Array: | |
30 | sig | |
31 | val create: int * 'a -> 'a array | |
32 | val sub: 'a array * int -> 'a | |
33 | val update: 'a array * int * 'a -> unit | |
34 | end | |
35 | structure CharArray: UNSAFE_MONO_ARRAY | |
36 | structure CharVector: UNSAFE_MONO_VECTOR | |
37 | structure IntArray: UNSAFE_MONO_ARRAY | |
38 | structure IntVector: UNSAFE_MONO_VECTOR | |
39 | structure Int8Array: UNSAFE_MONO_ARRAY | |
40 | structure Int8Vector: UNSAFE_MONO_VECTOR | |
41 | structure Int16Array: UNSAFE_MONO_ARRAY | |
42 | structure Int16Vector: UNSAFE_MONO_VECTOR | |
43 | structure Int32Array: UNSAFE_MONO_ARRAY | |
44 | structure Int32Vector: UNSAFE_MONO_VECTOR | |
45 | structure Int64Array: UNSAFE_MONO_ARRAY | |
46 | structure Int64Vector: UNSAFE_MONO_VECTOR | |
47 | structure IntInfArray: UNSAFE_MONO_ARRAY | |
48 | structure IntInfVector: UNSAFE_MONO_VECTOR | |
49 | structure LargeIntArray: UNSAFE_MONO_ARRAY | |
50 | structure LargeIntVector: UNSAFE_MONO_VECTOR | |
51 | structure LargeRealArray: UNSAFE_MONO_ARRAY | |
52 | structure LargeRealVector: UNSAFE_MONO_VECTOR | |
53 | structure LargeWordArray: UNSAFE_MONO_ARRAY | |
54 | structure LargeWordVector: UNSAFE_MONO_VECTOR | |
55 | structure RealArray: UNSAFE_MONO_ARRAY | |
56 | structure RealVector: UNSAFE_MONO_VECTOR | |
57 | structure Real32Array: UNSAFE_MONO_ARRAY | |
58 | structure Real32Vector: UNSAFE_MONO_VECTOR | |
59 | structure Real64Array: UNSAFE_MONO_ARRAY | |
60 | structure Vector: | |
61 | sig | |
62 | val sub: 'a vector * int -> 'a | |
63 | end | |
64 | structure Word8Array: UNSAFE_MONO_ARRAY | |
65 | structure Word8Vector: UNSAFE_MONO_VECTOR | |
66 | structure Word16Array: UNSAFE_MONO_ARRAY | |
67 | structure Word16Vector: UNSAFE_MONO_VECTOR | |
68 | structure Word32Array: UNSAFE_MONO_ARRAY | |
69 | structure Word32Vector: UNSAFE_MONO_VECTOR | |
70 | structure Word64Array: UNSAFE_MONO_ARRAY | |
71 | structure Word64Vector: UNSAFE_MONO_VECTOR | |
72 | ||
73 | structure PackReal32Big : PACK_REAL | |
74 | structure PackReal32Little : PACK_REAL | |
75 | structure PackReal64Big : PACK_REAL | |
76 | structure PackReal64Little : PACK_REAL | |
77 | structure PackRealBig : PACK_REAL | |
78 | structure PackRealLittle : PACK_REAL | |
79 | structure PackWord16Big : PACK_WORD | |
80 | structure PackWord16Little : PACK_WORD | |
81 | structure PackWord32Big : PACK_WORD | |
82 | structure PackWord32Little : PACK_WORD | |
83 | structure PackWord64Big : PACK_WORD | |
84 | structure PackWord64Little : PACK_WORD | |
85 | end | |
86 | ---- |