[MLton-commit] r4753

Vesa Karvonen vesak at mlton.org
Mon Oct 23 03:45:56 PDT 2006


Parameterized isomorphisms by the rounding mode.
----------------------------------------------------------------------

U   mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-real-ext.fun
U   mltonlib/trunk/com/ssh/extended-basis/unstable/public/real.sig

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

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-real-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-real-ext.fun	2006-10-23 10:29:46 UTC (rev 4752)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-real-ext.fun	2006-10-23 10:45:49 UTC (rev 4753)
@@ -7,13 +7,12 @@
 (**
  * Functor for extending {REAL} modules.
  *)
-
 functor MkRealExt (R : REAL) = struct
    open R
    val embDecimal = (toDecimal, fromDecimal)
    val embString = (toString, fromString)
-   val isoInt = (toInt IEEEReal.TO_NEAREST, fromInt)
-   val isoLarge = (toLarge, fromLarge IEEEReal.TO_NEAREST)
-   val isoLargeInt = (toLargeInt IEEEReal.TO_NEAREST, fromLargeInt)
+   fun isoInt mode = (toInt mode, fromInt)
+   fun isoLarge mode = (toLarge, fromLarge mode)
+   fun isoLargeInt mode = (toLargeInt mode, fromLargeInt)
    val isoManExp = (toManExp, fromManExp)
 end

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/real.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/real.sig	2006-10-23 10:29:46 UTC (rev 4752)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/real.sig	2006-10-23 10:45:49 UTC (rev 4753)
@@ -17,8 +17,8 @@
 
    (** == Isomorphisms == *)
 
-   val isoInt : (real, Int.int) iso
-   val isoLarge : (real, LargeReal.real) iso
-   val isoLargeInt : (real, LargeInt.int) iso
+   val isoInt : IEEEReal.rounding_mode -> (real, Int.int) iso
+   val isoLarge : IEEEReal.rounding_mode -> (real, LargeReal.real) iso
+   val isoLargeInt : IEEEReal.rounding_mode -> (real, LargeInt.int) iso
    val isoManExp : (real, {man : real, exp : int}) iso
 end




More information about the MLton-commit mailing list