@@ -24,9 +24,9 @@ module Asyncly.AsyncT
2424 , interleave
2525 , (<=>)
2626 , parAhead
27− , (<>>)
27+ , (<>|)
2828 , parLeft
29− , (|>)
29+ , (<|)
3030 , foldWith
3131 , foldMapWith
3232 , forEachWith
@@ -418,17 +418,19 @@ instance MonadAsync m => Alternative (AsyncT m) where
418418 queueWork c m1 >> queueWork c m2
419419 (runAsyncT (dequeueLoop c)) Nothing stp yld
420420
421−-- | Run actions in parallel but return the results in serial order from left
422−-- to right.
421+-- | Just like '<>' except that it can execute the action on the right in
422+-- parallel ahead of time. Returns the results in serial order like '<>' from
423+-- left to right.
423424parAhead :: MonadAsync m => AsyncT m a -> AsyncT m a -> AsyncT m a
424425parAhead = undefined
425426
426−(<>>) :: MonadAsync m => AsyncT m a -> AsyncT m a -> AsyncT m a
427−(<>>) = parAhead
427+(<>|) :: MonadAsync m => AsyncT m a -> AsyncT m a -> AsyncT m a
428+(<>|) = parAhead
428429
429−-- | Left biased parallel execution. Actions are run in parallel but the
430−-- the actions on the left are likely to be executed before those on
431−-- the right. This combinator is useful when fairness is not required.
430+-- | Left biased parallel execution. Actions may run in parallel but not
431+-- necessarily, the action on the left is executed before the one on the right
432+-- when parallelism is not needed. This combinator is useful when fairness is
433+-- not required.
432434{-# INLINE parLeft #-}
433435parLeft :: MonadAsync m => AsyncT m a -> AsyncT m a -> AsyncT m a
434436parLeft m1 m2 = AsyncT $ \ctx stp yld -> do
@@ -442,9 +444,9 @@ parLeft m1 m2 = AsyncT $ \ctx stp yld -> do
442444 (runAsyncT (dequeueLoop c)) Nothing stp yld
443445
444446-- | Same as 'parLeft'.
445−{-# INLINE (|>) #-}
446−(|>) :: MonadAsync m => AsyncT m a -> AsyncT m a -> AsyncT m a
447−(|>) = parLeft
447+{-# INLINE (<|) #-}
448+(<|) :: MonadAsync m => AsyncT m a -> AsyncT m a -> AsyncT m a
449+(<|) = parLeft
448450
449451instance MonadAsync m => MonadPlus (AsyncT m) where
450452 mzero = empty