[MLton-commit] r5797

Vesa Karvonen vesak at mlton.org
Thu Jul 26 23:07:53 PDT 2007


Trivialities.
----------------------------------------------------------------------

U   mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bootstrap.sml
U   mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn/thunk.sml
U   mltonlib/trunk/com/ssh/extended-basis/unstable/public/data/unit.sig
U   mltonlib/trunk/com/ssh/extended-basis/unstable/public/fn/thunk.sig

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

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bootstrap.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bootstrap.sml	2007-07-27 05:50:56 UTC (rev 5796)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bootstrap.sml	2007-07-27 06:07:52 UTC (rev 5797)
@@ -9,7 +9,7 @@
 structure Void = struct abstype t = T with fun void T = void T end end
 structure Exn = struct type t = exn end
 structure Fn = struct type ('a, 'b) t = 'a -> 'b end
-structure Unit = struct type t = unit end
+structure Unit = struct type t = unit fun compare ((), ()) = EQUAL end
 structure Bool = struct
    open BasisBool
    type t = bool

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn/thunk.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn/thunk.sml	2007-07-27 05:50:56 UTC (rev 5796)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn/thunk.sml	2007-07-27 06:07:52 UTC (rev 5797)
@@ -7,4 +7,5 @@
 structure Thunk :> THUNK = struct
    open Thunk
    val mk = Fn.const
+   val iso = (mk, fn th => th ())
 end

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/data/unit.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/data/unit.sig	2007-07-27 05:50:56 UTC (rev 5796)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/data/unit.sig	2007-07-27 06:07:52 UTC (rev 5797)
@@ -8,4 +8,7 @@
 signature UNIT = sig
    type t = unit
    (** The unit type. *)
+
+   val compare : t Cmp.t
+   (** The trivial compare function. *)
 end

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/fn/thunk.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/fn/thunk.sig	2007-07-27 05:50:56 UTC (rev 5796)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/fn/thunk.sig	2007-07-27 06:07:52 UTC (rev 5797)
@@ -11,4 +11,7 @@
 
    val mk : 'a -> 'a t
    (** Constant thunk ({thunk x = let val x = x in fn () => x end}). *)
+
+   val iso : ('a, 'a t) Iso.t
+   (** The trivial isomorphism between values and thunks. *)
 end




More information about the MLton-commit mailing list