Commit | Line | Data |
---|---|---|
7f918cf1 CE |
1 | (* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh |
2 | * Jagannathan, and Stephen Weeks. | |
3 | * | |
4 | * MLton is released under a BSD-style license. | |
5 | * See the file MLton-LICENSE for details. | |
6 | *) | |
7 | ||
8 | signature RATIONAL = | |
9 | sig | |
10 | include ORDERED_FIELD | |
11 | ||
12 | structure I : INTEGER | |
13 | ||
14 | val isInt : t -> bool | |
15 | ||
16 | val make : I.t * I.t -> t | |
17 | ||
18 | val fromInt : I.t -> t | |
19 | val toInt : t -> I.t | |
20 | val numerator : t -> I.t | |
21 | val denominator : t -> I.t | |
22 | ||
23 | (* val toInt : t -> int | |
24 | val intTo : int -> t | |
25 | val intIntTo : int * int -> t | |
26 | *) | |
27 | val toReal : t -> real | |
28 | end |