Commit | Line | Data |
---|---|---|
7f918cf1 CE |
1 | (* Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh |
2 | * Jagannathan, and Stephen Weeks. | |
3 | * Copyright (C) 1997-2000 NEC Research Institute. | |
4 | * | |
5 | * MLton is released under a BSD-style license. | |
6 | * See the file MLton-LICENSE for details. | |
7 | *) | |
8 | ||
9 | (* Primitive names are special -- see atoms/prim.fun. *) | |
10 | ||
11 | structure Primitive = struct | |
12 | ||
13 | open Primitive | |
14 | ||
15 | structure PackReal32 = | |
16 | struct | |
17 | type real = Real32.real | |
18 | type word = Word32.word | |
19 | ||
20 | val castFromWord = _prim "Word32_castToReal32": word -> real; | |
21 | val castToWord = _prim "Real32_castToWord32": real -> word; | |
22 | end | |
23 | ||
24 | structure PackReal64 = | |
25 | struct | |
26 | type real = Real64.real | |
27 | type word = Word64.word | |
28 | ||
29 | val castFromWord = _prim "Word64_castToReal64": word -> real; | |
30 | val castToWord = _prim "Real64_castToWord64": real -> word; | |
31 | end | |
32 | ||
33 | end |