[MLton-commit] r6482

Vesa Karvonen vesak at mlton.org
Sat Mar 15 11:55:26 PST 2008


Support product sign >< as an alternative to >>&.
----------------------------------------------------------------------

U   mltonlib/trunk/com/ssh/extended-basis/unstable/detail/concept/mk-monad.fun
U   mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/monad.sig
U   mltonlib/trunk/com/ssh/extended-basis/unstable/public/export/infixes.sml

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

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/concept/mk-monad.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/concept/mk-monad.fun	2008-03-15 10:20:11 UTC (rev 6481)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/concept/mk-monad.fun	2008-03-15 19:55:25 UTC (rev 6482)
@@ -5,7 +5,7 @@
  *)
 
 functor MkMonad (Core : MONAD_CORE) : MONAD = struct
-   infix >> >>& >>* >>= >>@ oo =<<
+   infix >> >>& >< >>* >>= >>@ oo =<<
 
    open Core
 
@@ -24,6 +24,7 @@
       fun mk f (aM, bM) = aM >>= (fn a => bM >>= (fn b => return (f (a, b))))
    in
       fun op >>& ? = mk Product.& ?
+      val op >< = op >>&
       fun op >>* ? = mk Fn.id ?
       fun op >>@ ? = mk Fn.\> ?
    end

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/monad.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/monad.sig	2008-03-15 10:20:11 UTC (rev 6481)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/monad.sig	2008-03-15 19:55:25 UTC (rev 6482)
@@ -39,6 +39,7 @@
    val =<< : ('a -> 'b monad_ex) * 'a monad_ex -> 'b monad_ex
    val >> : 'a monad_ex * 'b monad_ex -> 'b monad_ex
    val >>& : 'a monad_ex * 'b monad_ex -> ('a, 'b) Product.t monad_ex
+   val >< : 'a monad_ex * 'b monad_ex -> ('a, 'b) Product.t monad_ex
    val >>* : 'a monad_ex * 'b monad_ex -> ('a * 'b) monad_ex
    val >>@ : ('a -> 'b) monad_ex * 'a monad_ex -> 'b monad_ex
 

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/export/infixes.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/export/infixes.sml	2008-03-15 10:20:11 UTC (rev 6481)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/export/infixes.sml	2008-03-15 19:55:25 UTC (rev 6482)
@@ -71,6 +71,7 @@
 (* ========================================================================== *)
 infix  1 !    :=   ! orElse  !       ! >>= >>& !        ! :=: += -=
          !         !         !       ! >>* >>@ !        !
+         !         !         !       ! ><      !        !
 (* -------------------------------------------------------------------------- *)
 infixr 1 !         !         !       !   =<<   !        !
 (* ========================================================================== *)




More information about the MLton-commit mailing list