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