1 (* Copyright (C) 2004-2007 Henry Cejtin, Matthew Fluet, Suresh
2 * Jagannathan, and Stephen Weeks.
4 * MLton is released under a BSD-style license.
5 * See the file MLton-LICENSE for details.
8 functor RealSize (S: REAL_SIZE_STRUCTS): REAL_SIZE =
13 datatype t = R32 | R64
17 val equals: t * t -> bool = op =
19 val memoize: (t -> 'a) -> t -> 'a =
33 val bytes: t -> Bytes.t =
34 fn R32 => Bytes.fromInt 4
35 | R64 => Bytes.fromInt 8
37 val bits: t -> Bits.t = Bytes.toBits o bytes