[MLton-commit] r5738

Matthew Fluet fluet at mlton.org
Sun Jul 8 11:49:38 PDT 2007


Minor tweaks to get wiki tool to compile
----------------------------------------------------------------------

U   mlton/trunk/basis-library/mlton/socket.sig
U   mlton/trunk/lib/mlton/basic/net.sml

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

Modified: mlton/trunk/basis-library/mlton/socket.sig
===================================================================
--- mlton/trunk/basis-library/mlton/socket.sig	2007-07-08 01:20:46 UTC (rev 5737)
+++ mlton/trunk/basis-library/mlton/socket.sig	2007-07-08 18:49:37 UTC (rev 5738)
@@ -10,7 +10,7 @@
    sig
       structure Address:
          sig
-            type t
+            type t = NetHostDB.in_addr
          end
 
       structure Ctl:
@@ -30,7 +30,7 @@
 
       structure Port:
          sig
-            type t
+            type t = int
          end
 
       type t

Modified: mlton/trunk/lib/mlton/basic/net.sml
===================================================================
--- mlton/trunk/lib/mlton/basic/net.sml	2007-07-08 01:20:46 UTC (rev 5737)
+++ mlton/trunk/lib/mlton/basic/net.sml	2007-07-08 18:49:37 UTC (rev 5738)
@@ -8,8 +8,6 @@
 structure Net: NET =
 struct
 
-type port = int
-
 val repeat: {limit: Time.t, tries: int} option ref = ref NONE
 
 local
@@ -47,6 +45,7 @@
 val message = Trace.Immediate.messageStr
 
 structure Socket = MLton.Socket
+type port = Socket.Port.t
 
 fun connect {host: string, port: port}: In.t * Out.t =
    let
@@ -75,7 +74,7 @@
                Process.try (fn () => Socket.accept socket, "accept failed")
             val name =
                case Socket.Host.getByAddress a of
-                  NONE => Word.toString a
+                  NONE => NetHostDB.toString a
                 | SOME {name, ...} => name
             val _ =
                Process.doubleFork




More information about the MLton-commit mailing list