module Haskus.Utils.Flow
( MonadIO (..)
, MonadInIO (..)
, (|>)
, (<|)
, (||>)
, (<||)
, when
, unless
, whenM
, unlessM
, ifM
, guard
, void
, forever
, foldM
, foldM_
, forM
, forM_
, mapM
, mapM_
, sequence
, replicateM
, replicateM_
, filterM
, join
, (<=<)
, (>=>)
, loopM
, whileM
, module Haskus.Utils.Variant.Flow
)
where
import Haskus.Utils.Variant
import Haskus.Utils.Variant.Flow
import Haskus.Utils.Monad
(|>) :: a -> (a -> b) -> b
{-# INLINE (|>) #-}
x |> f = f x
infixl 0 |>
(<|) :: (a -> b) -> a -> b
{-# INLINE (<|) #-}
f <| x = f x
infixr 0 <|
(||>) :: Functor f => f a -> (a -> b) -> f b
{-# INLINE (||>) #-}
x ||> f = fmap f x
infixl 0 ||>
(<||) :: Functor f => (a -> b) -> f a -> f b
{-# INLINE (<||) #-}
f <|| x = fmap f x
infixr 0 <||