[MLton-commit] r6317

Vesa Karvonen vesak at mlton.org
Sun Jan 13 08:01:22 PST 2008


Using new formatting stuff from extended-basis.
----------------------------------------------------------------------

U   mltonlib/trunk/com/ssh/async/unstable/example/actor/counter-example.sml
U   mltonlib/trunk/com/ssh/async/unstable/example/actor/counter.sml
U   mltonlib/trunk/com/ssh/async/unstable/example/smlbot/main.sml

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

Modified: mltonlib/trunk/com/ssh/async/unstable/example/actor/counter-example.sml
===================================================================
--- mltonlib/trunk/com/ssh/async/unstable/example/actor/counter-example.sml	2008-01-10 17:25:32 UTC (rev 6316)
+++ mltonlib/trunk/com/ssh/async/unstable/example/actor/counter-example.sml	2008-01-13 16:01:21 UTC (rev 6317)
@@ -5,7 +5,7 @@
  *)
 
 val () = let
-   open Actor
+   open Cvt Actor
 
    val actor =
        new (fn this => let
@@ -15,7 +15,7 @@
                 ; counter += Counter.Incr
                 ; counter += Counter.Value this
                 ; receive (fn Counter.Int v =>
-                              println (Int.toString v))
+                              println (D v))
                end)
 in
    start actor

Modified: mltonlib/trunk/com/ssh/async/unstable/example/actor/counter.sml
===================================================================
--- mltonlib/trunk/com/ssh/async/unstable/example/actor/counter.sml	2008-01-10 17:25:32 UTC (rev 6316)
+++ mltonlib/trunk/com/ssh/async/unstable/example/actor/counter.sml	2008-01-13 16:01:21 UTC (rev 6317)
@@ -13,12 +13,12 @@
    exception Unlock of Int.t
 
    fun new () = let
-      open Actor
+      open Cvt Actor
    in
       new (fn _ =>
          recur 0 (fn loop =>
             fn value =>
-               (println ("Value: " ^ Int.toString value)
+               (printlns ["Value: ", D value]
               ; receive (fn
                    Incr    => loop (value + 1)
                  | Value a => (a += Int value ; loop value)

Modified: mltonlib/trunk/com/ssh/async/unstable/example/smlbot/main.sml
===================================================================
--- mltonlib/trunk/com/ssh/async/unstable/example/smlbot/main.sml	2008-01-10 17:25:32 UTC (rev 6316)
+++ mltonlib/trunk/com/ssh/async/unstable/example/smlbot/main.sml	2008-01-13 16:01:21 UTC (rev 6317)
@@ -34,7 +34,7 @@
                 | "-pass" => pass
                 | "-nick" => nick
                 | "-channel" => channel
-                | _ => fail ("Invalid option "^opt)) arg
+                | _ => fails ["Invalid option ", opt]) arg
         ; lp rest)
-       | opt::_ => fail ("Invalid option "^opt))
+       | opt::_ => fails ["Invalid option ", opt])
 end




More information about the MLton-commit mailing list