[MLton-commit] r5456

Vesa Karvonen vesak at mlton.org
Tue Mar 20 23:19:56 PST 2007


Simplified.
----------------------------------------------------------------------

U   mltonlib/trunk/com/ssh/misc-util/unstable/unlinkable-list.sml

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

Modified: mltonlib/trunk/com/ssh/misc-util/unstable/unlinkable-list.sml
===================================================================
--- mltonlib/trunk/com/ssh/misc-util/unstable/unlinkable-list.sml	2007-03-21 00:51:48 UTC (rev 5455)
+++ mltonlib/trunk/com/ssh/misc-util/unstable/unlinkable-list.sml	2007-03-21 07:19:55 UTC (rev 5456)
@@ -5,17 +5,15 @@
  *)
 
 structure UnlinkableList :> sig
-   type 'a t and l
+   type 'a t
 
    val new : 'a t Thunk.t
 
-   val pushFront : 'a t -> 'a -> l
-   val pushBack : 'a t -> 'a -> l
+   val pushFront : 'a t -> 'a -> Unit.t Effect.t
+   val pushBack : 'a t -> 'a -> Unit.t Effect.t
 
    val popFront : 'a t -> 'a Option.t
    val popBack : 'a t -> 'a Option.t
-
-   val unlink : l Effect.t
 end = struct
    type 'a p = 'a Option.t Ref.t
    val ! = fn p => case !p of SOME it => it | _ => fail "bug"
@@ -24,8 +22,6 @@
    datatype 'a t = RING of 'a l | NODE of {link : 'a l, value : 'a}
    withtype 'a l = {pred : 'a t p, succ : 'a t p}
 
-   type l = Unit.t Effect.t
-
    val link = fn RING link => link | NODE {link, ...} => link
    fun pred n = #pred (link n)
    fun succ n = #succ (link n)
@@ -44,8 +40,6 @@
       ls := n ; lp := n ; succ p := s ; pred s := p
    end
 
-   fun unlink ef = ef ()
-
    fun push (p, s, v) = let
       val l = newLink () val n = NODE {link = l, value = v}
    in




More information about the MLton-commit mailing list