[MLton-commit] r6165
Vesa Karvonen
vesak at mlton.org
Tue Nov 13 04:23:58 PST 2007
Ported (just) the library to Poly/ML and SML/NJ.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/async/unstable/README
U mltonlib/trunk/com/ssh/async/unstable/detail/async.sml
A mltonlib/trunk/com/ssh/async/unstable/detail/ml/
A mltonlib/trunk/com/ssh/async/unstable/detail/ml/smlnj/
A mltonlib/trunk/com/ssh/async/unstable/detail/ml/smlnj/unsealed.cm
A mltonlib/trunk/com/ssh/async/unstable/lib.cm
A mltonlib/trunk/com/ssh/async/unstable/lib.use
U mltonlib/trunk/com/ssh/async/unstable/test/async.sml
A mltonlib/trunk/com/ssh/async/unstable/test.use
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/async/unstable/README
===================================================================
--- mltonlib/trunk/com/ssh/async/unstable/README 2007-11-13 12:04:33 UTC (rev 6164)
+++ mltonlib/trunk/com/ssh/async/unstable/README 2007-11-13 12:23:57 UTC (rev 6165)
@@ -12,6 +12,7 @@
License: MLton license (a BSD-style license)
Portability: portable
+ Ported to: MLton, Poly/ML, and SML/NJ
Stability: experimental
Maintainer: Vesa Karvonen <vesa.a.j.k at gmail.com>
Modified: mltonlib/trunk/com/ssh/async/unstable/detail/async.sml
===================================================================
--- mltonlib/trunk/com/ssh/async/unstable/detail/async.sml 2007-11-13 12:04:33 UTC (rev 6164)
+++ mltonlib/trunk/com/ssh/async/unstable/detail/async.sml 2007-11-13 12:23:57 UTC (rev 6165)
@@ -5,6 +5,11 @@
*)
structure Async :> ASYNC = struct
+ (* <-- SML/NJ workaround *)
+ open TopLevel
+ infix <|>
+ (* SML/NJ workaround --> *)
+
exception Full
structure Queue = LinkedQueue
@@ -17,7 +22,7 @@
fun pushFront ul (h as T t) =
(List.push (#unlink t) (UnlinkableList.pushFront ul h)
; false)
- val handlers = Queue.new ()
+ val handlers : Unit.t Effect.t Queue.t = Queue.new ()
fun schedule a (T {unlink, effect}) =
(app (pass ()) (!unlink)
; Queue.enque handlers (fn () => effect a))
Added: mltonlib/trunk/com/ssh/async/unstable/detail/ml/smlnj/unsealed.cm
===================================================================
--- mltonlib/trunk/com/ssh/async/unstable/detail/ml/smlnj/unsealed.cm 2007-11-13 12:04:33 UTC (rev 6164)
+++ mltonlib/trunk/com/ssh/async/unstable/detail/ml/smlnj/unsealed.cm 2007-11-13 12:23:57 UTC (rev 6165)
@@ -0,0 +1,11 @@
+(* Copyright (C) 2007 Vesa Karvonen
+ *
+ * This code is released under the MLton license, a BSD-style license.
+ * See the LICENSE file or http://mlton.org/License for details.
+ *)
+
+group is
+ ../../../../../../../org/mlton/vesak/ds/unstable/lib.cm
+ ../../../../../extended-basis/unstable/basis.cm
+ ../../../public/async.sig
+ ../../async.sml
Added: mltonlib/trunk/com/ssh/async/unstable/lib.cm
===================================================================
--- mltonlib/trunk/com/ssh/async/unstable/lib.cm 2007-11-13 12:04:33 UTC (rev 6164)
+++ mltonlib/trunk/com/ssh/async/unstable/lib.cm 2007-11-13 12:23:57 UTC (rev 6165)
@@ -0,0 +1,11 @@
+(* Copyright (C) 2007 Vesa Karvonen
+ *
+ * This code is released under the MLton license, a BSD-style license.
+ * See the LICENSE file or http://mlton.org/License for details.
+ *)
+
+library
+ source(public/export.sml)
+is
+ detail/ml/smlnj/unsealed.cm
+ public/export.sml
Added: mltonlib/trunk/com/ssh/async/unstable/lib.use
===================================================================
--- mltonlib/trunk/com/ssh/async/unstable/lib.use 2007-11-13 12:04:33 UTC (rev 6164)
+++ mltonlib/trunk/com/ssh/async/unstable/lib.use 2007-11-13 12:23:57 UTC (rev 6165)
@@ -0,0 +1,11 @@
+(* Copyright (C) 2007 Vesa Karvonen
+ *
+ * This code is released under the MLton license, a BSD-style license.
+ * See the LICENSE file or http://mlton.org/License for details.
+ *)
+
+lib {reqs = ["../../../../org/mlton/vesak/ds/unstable/lib.use",
+ "../../extended-basis/unstable/basis.use"],
+ self = ["public/async.sig",
+ "detail/async.sml",
+ "public/export.sml"]} ;
Property changes on: mltonlib/trunk/com/ssh/async/unstable/lib.use
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: mltonlib/trunk/com/ssh/async/unstable/test/async.sml
===================================================================
--- mltonlib/trunk/com/ssh/async/unstable/test/async.sml 2007-11-13 12:04:33 UTC (rev 6164)
+++ mltonlib/trunk/com/ssh/async/unstable/test/async.sml 2007-11-13 12:23:57 UTC (rev 6165)
@@ -9,9 +9,9 @@
*)
val () = let
open Generic UnitTest Async Async.Handler
- fun eq ex ac = verifyEq int {actual = ac, expect = ex}
- fun eql ex ac = verifyEq (list int) {actual = ac, expect = ex}
- val full = verifyFailsWith (fn Full => true | _ => false)
+ fun eq ex ac = thatEq int {actual = ac, expect = ex}
+ fun eql ex ac = thatEq (list int) {actual = ac, expect = ex}
+ val full = thatRaises' (fn Full => ())
fun inc v () = v := !v + 1
val push = List.push
in
Added: mltonlib/trunk/com/ssh/async/unstable/test.use
===================================================================
--- mltonlib/trunk/com/ssh/async/unstable/test.use 2007-11-13 12:04:33 UTC (rev 6164)
+++ mltonlib/trunk/com/ssh/async/unstable/test.use 2007-11-13 12:23:57 UTC (rev 6165)
@@ -0,0 +1,11 @@
+(* Copyright (C) 2007 Vesa Karvonen
+ *
+ * This code is released under the MLton license, a BSD-style license.
+ * See the LICENSE file or http://mlton.org/License for details.
+ *)
+
+lib {reqs = ["../../generic/unstable/lib-with-default.use",
+ "../../unit-test/unstable/lib-with-default.use",
+ "../../extended-basis/unstable/basis.use",
+ "lib.use"],
+ self = ["test/async.sml"]} ;
Property changes on: mltonlib/trunk/com/ssh/async/unstable/test.use
___________________________________________________________________
Name: svn:eol-style
+ native
More information about the MLton-commit
mailing list