[MLton-commit] r6087

Vesa Karvonen vesak at mlton.org
Thu Oct 25 04:31:49 PDT 2007


Workarounds for MLKit.  The lib still doesn't compile with MLKit (4.3.2).

Datatype replication of bool does not seem to work in MLKit!  So, the ugly
workaround is to not provide the true and false constructors in the Bool
structure.

Pattern matching of LargeInt values does not seem to work in MLKit!  So,
the workaround is to use comparisons.

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

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-10-25 11:10:34 UTC (rev 6086)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/data/bool.sml	2007-10-25 11:31:48 UTC (rev 6087)
@@ -29,7 +29,7 @@
            fn 0 : FixedInt.t => false | _ => true)
       val isoLargeInt as (toLargeInt, fromLargeInt) =
           (fn true => 1 | false => 0 : LargeInt.t,
-           fn 0 : LargeInt.t => false | _ => true)
+           fn i : LargeInt.t => 0 <> i)
    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-10-25 11:10:34 UTC (rev 6086)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/data/bool.sig	2007-10-25 11:31:48 UTC (rev 6087)
@@ -6,7 +6,7 @@
 
 (** Extended {BOOL} signature. *)
 signature BOOL = sig
-   datatype bool = datatype bool
+   type bool = bool
    (** The {bool} datatype. *)
 
    type t = bool




More information about the MLton-commit mailing list