equal
deleted
inserted
replaced
|
1 (* ========================================================================= *) |
|
2 (* ML SPECIFIC FUNCTIONS *) |
|
3 (* Copyright (c) 2001-2007 Joe Hurd, distributed under the GNU GPL version 2 *) |
|
4 (* ========================================================================= *) |
|
5 |
|
6 signature Portable = |
|
7 sig |
|
8 |
|
9 (* ------------------------------------------------------------------------- *) |
|
10 (* The ML implementation. *) |
|
11 (* ------------------------------------------------------------------------- *) |
|
12 |
|
13 val ml : string |
|
14 |
|
15 (* ------------------------------------------------------------------------- *) |
|
16 (* Pointer equality using the run-time system. *) |
|
17 (* ------------------------------------------------------------------------- *) |
|
18 |
|
19 val pointerEqual : 'a * 'a -> bool |
|
20 |
|
21 (* ------------------------------------------------------------------------- *) |
|
22 (* Timing function applications. *) |
|
23 (* ------------------------------------------------------------------------- *) |
|
24 |
|
25 val time : ('a -> 'b) -> 'a -> 'b |
|
26 |
|
27 (* ------------------------------------------------------------------------- *) |
|
28 (* Generating random values. *) |
|
29 (* ------------------------------------------------------------------------- *) |
|
30 |
|
31 val randomBool : unit -> bool |
|
32 |
|
33 val randomInt : int -> int (* n |-> [0,n) *) |
|
34 |
|
35 val randomReal : unit -> real (* () |-> [0,1] *) |
|
36 |
|
37 val randomWord : unit -> Word.word |
|
38 |
|
39 end |