[MLton-commit] r6320

Vesa Karvonen vesak at mlton.org
Sun Jan 13 08:30:11 PST 2008


Moved FRU to extended-basis.  Added a CPS module to extended-basis.
Changed the type abbreviations of Fold to make them more "compositional".

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

U   mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fold/fold.sml
U   mltonlib/trunk/com/ssh/extended-basis/unstable/detail/ml/smlnj/sigs.cm
U   mltonlib/trunk/com/ssh/extended-basis/unstable/detail/ml/smlnj/unsealed.cm

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

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fold/fold.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fold/fold.sml	2008-01-13 16:17:55 UTC (rev 6319)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fold/fold.sml	2008-01-13 16:30:10 UTC (rev 6320)
@@ -5,7 +5,15 @@
  *)
 
 structure Fold :> FOLD = struct
-   open Fn CPS
+   (* <-- SML/NJ workaround *)
+   fun pass x k = k x
+   fun id x = x
+   structure Pair = struct
+      fun map (f, g) (x, y) = (f x, g y)
+      fun fst (x, _) = x
+      fun snd (_, y) = y
+   end
+   (* SML/NJ workaround --> *)
    datatype ('a, 'b, 'c) t = T of 'a * ('b -> 'c)
    type ('s1, 's2, 'r) s = 's1 -> ('s2, 'r) CPS.t
    fun $ (T (t, f)) = f t

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/ml/smlnj/sigs.cm
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/ml/smlnj/sigs.cm	2008-01-13 16:17:55 UTC (rev 6319)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/ml/smlnj/sigs.cm	2008-01-13 16:30:10 UTC (rev 6320)
@@ -89,4 +89,5 @@
    ../../../public/text/text.sig
    ../../../public/time/time.sig
    ../../../public/typing/phantom.sig
+   ../../fold/fold.sml
    bootstrap.cm

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/ml/smlnj/unsealed.cm
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/ml/smlnj/unsealed.cm	2008-01-13 16:17:55 UTC (rev 6319)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/ml/smlnj/unsealed.cm	2008-01-13 16:30:10 UTC (rev 6320)
@@ -39,7 +39,6 @@
    ../../../detail/fn/thunk.sml
    ../../../detail/fn/un-op.sml
    ../../../detail/fn/un-pr.sml
-   ../../../detail/fold/fold.sml
    ../../../detail/fold/fru.sml
    ../../../detail/generic/emb.sml
    ../../../detail/generic/fix.sml




More information about the MLton-commit mailing list