[MLton-commit] r5846

Vesa Karvonen vesak at mlton.org
Sun Aug 12 14:10:52 PDT 2007


Made Bool INTABLE.
----------------------------------------------------------------------

U   mltonlib/trunk/com/ssh/extended-basis/unstable/detail/data/bool.sml
U   mltonlib/trunk/com/ssh/extended-basis/unstable/public/data/bool.sig

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

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/data/bool.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/data/bool.sml	2007-08-11 18:25:46 UTC (rev 5845)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/data/bool.sml	2007-08-12 21:10:51 UTC (rev 5846)
@@ -9,6 +9,7 @@
       open Bool
       type bitwise = t
       type bounded = t
+      type intable = t
       type ordered = t
       type scannable = t
       type stringable = t
@@ -21,7 +22,10 @@
       val notb = not
       fun orb (b1, b2) = b1 orelse b2
       val xorb = op <>
-      val toInt = fn true => 1 | false => 0
+      val isoInt as (toInt, fromInt) =
+          (fn true => 1 | false => 0, fn 0 => false | _ => true)
+      val isoLargeInt as (toLargeInt, fromLargeInt) : (t, LargeInt.t) Iso.t =
+          (fn true => 1 | false => 0, fn 0 => false | _ => true)
    end
 
    structure Bounded = MkBounded (Core)

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/data/bool.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/data/bool.sig	2007-08-11 18:25:46 UTC (rev 5845)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/data/bool.sig	2007-08-12 21:10:51 UTC (rev 5846)
@@ -21,13 +21,11 @@
    val isFalse : t UnPr.t
    (** {isFalse x = x = false} *)
 
-   val toInt : t -> Int.t
-   (** {toInt true = 1} and {toInt false = 0}. *)
-
    (** == Concepts == *)
 
    include BITWISE where type bitwise = t
    include BOUNDED where type bounded = t
+   include INTABLE where type intable = t
    include ORDERED where type ordered = t
    include SCANNABLE where type scannable = t
    include STRINGABLE where type stringable = t




More information about the MLton-commit mailing list