The (>|) function in Control.Parallel.Strategies

View: New views
1 Messages — Rating Filter:   Alert me  

The (>|) function in Control.Parallel.Strategies

by Wei Hu-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The documentation of (>|) says that it "evaluates the first argument
before the second". The function is defined as
(http://www.haskell.org/ghc/docs/6.10-latest/html/libraries/parallel/src/Control-Parallel-Strategies.html#%3E|):

(>|) :: Done -> Done -> Done
{-# INLINE (>|) #-}
(>|) = Prelude.seq

I'm curious why it's defined as Prelude.seq, instead of pseq? The
semantics seems to require pseq here. I also found the following
comment that doesn't make sense to me:

The operators >| and >|| are alternative names for `seq` and `par`.
With the introduction of a Prelude function `seq` separating the Prelude
function from the Strategy function becomes a pain. The notation also matches
the notation for strategic function application.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@...
http://www.haskell.org/mailman/listinfo/haskell-cafe