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