[MLton-commit] r4384

Stephen Weeks MLton@mlton.org
Tue, 28 Mar 2006 16:21:11 -0800


Made Primitive.Real.class return an abstract type.

----------------------------------------------------------------------

U   mlton/trunk/basis-library/real/real.fun
U   mlton/trunk/basis-library/real/real.sig

----------------------------------------------------------------------

Modified: mlton/trunk/basis-library/real/real.fun
===================================================================
--- mlton/trunk/basis-library/real/real.fun	2006-03-28 22:58:06 UTC (rev 4383)
+++ mlton/trunk/basis-library/real/real.fun	2006-03-29 00:21:10 UTC (rev 4384)
@@ -63,10 +63,11 @@
 
       val nan = posInf + negInf
 
+      structure Class = Primitive.Real64.Class
       local
          val classes =
             let
-               open Primitive.Real64.Class
+               open Class
             in
                (* order here is chosen based on putting the more commonly used
                 * classes at the front.
@@ -103,7 +104,7 @@
             INF => false
           | NAN => false
           | _ => true
-               
+
       fun isNan r = class r = NAN
 
       fun isNormal r = class r = NORMAL

Modified: mlton/trunk/basis-library/real/real.sig
===================================================================
--- mlton/trunk/basis-library/real/real.sig	2006-03-28 22:58:06 UTC (rev 4383)
+++ mlton/trunk/basis-library/real/real.sig	2006-03-29 00:21:10 UTC (rev 4384)
@@ -27,7 +27,7 @@
       val ?= : real * real -> bool
       val ~ : real -> real
       val abs: real -> real
-      val class: real -> int
+      val class: real -> Primitive.Real64.Class.t
       val frexp: real * int ref -> real
       val gdtoa: real * int * int * int ref -> Primitive.CString.t
       val fromInt: int -> real