| 1 |
(* mlrep.sml |
| 2 |
* 2007 Matthew Fluet ([email protected]) |
| 3 |
* Adapted for MLton. Make use of $(SML_LIB)/basis/c-types.mlb |
| 4 |
* 2005 Matthew Fluet ([email protected]) |
| 5 |
* Adapted for MLton. |
| 6 |
*) |
| 7 |
|
| 8 |
(* mlrep-i32f64.sml |
| 9 |
* |
| 10 |
* User-visible ML-side representation of certain primitive C types. |
| 11 |
* x86/Sparc/PPC version (all ints: 32 bit, all floats: 64 bit) |
| 12 |
* |
| 13 |
* Copyright (c) 2004 by The Fellowship of SML/NJ |
| 14 |
* |
| 15 |
* Author: Matthias Blume ([email protected]) |
| 16 |
*) |
| 17 |
structure MLRep = struct |
| 18 |
structure Char = |
| 19 |
struct |
| 20 |
structure Signed = C_SChar |
| 21 |
structure Unsigned = C_UChar |
| 22 |
(* word-style bit-operations on integers... *) |
| 23 |
structure SignedBitops = IntBitOps(structure I = Signed |
| 24 |
structure W = Unsigned) |
| 25 |
end |
| 26 |
structure Short = |
| 27 |
struct |
| 28 |
structure Signed = C_SShort |
| 29 |
structure Unsigned = C_UShort |
| 30 |
(* word-style bit-operations on integers... *) |
| 31 |
structure SignedBitops = IntBitOps(structure I = Signed |
| 32 |
structure W = Unsigned) |
| 33 |
end |
| 34 |
structure Int = |
| 35 |
struct |
| 36 |
structure Signed = C_SInt |
| 37 |
structure Unsigned = C_UInt |
| 38 |
(* word-style bit-operations on integers... *) |
| 39 |
structure SignedBitops = IntBitOps(structure I = Signed |
| 40 |
structure W = Unsigned) |
| 41 |
end |
| 42 |
structure Long = |
| 43 |
struct |
| 44 |
structure Signed = C_SLong |
| 45 |
structure Unsigned = C_ULong |
| 46 |
(* word-style bit-operations on integers... *) |
| 47 |
structure SignedBitops = IntBitOps(structure I = Signed |
| 48 |
structure W = Unsigned) |
| 49 |
end |
| 50 |
structure LongLong = |
| 51 |
struct |
| 52 |
structure Signed = C_SLongLong |
| 53 |
structure Unsigned = C_ULongLong |
| 54 |
(* word-style bit-operations on integers... *) |
| 55 |
structure SignedBitops = IntBitOps(structure I = Signed |
| 56 |
structure W = Unsigned) |
| 57 |
end |
| 58 |
structure Float = C_Float |
| 59 |
structure Double = C_Double |
| 60 |
end |