{-# LANGUAGE BlockArguments #-}
module Control.Churro.Transport
( module Control.Churro.Transport.Chan
, module Control.Churro.Transport
)
where
import Control.Churro.Transport.Chan
import Control.Churro.Types
l2c :: Transport t => t (Maybe a) -> [a] -> IO ()
l2c :: t (Maybe a) -> [a] -> IO ()
l2c t (Maybe a)
c [a]
l = (a -> IO ()) -> [a] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ (t (Maybe a) -> Maybe a -> IO ()
forall (t :: * -> *) a. Transport t => t a -> a -> IO ()
yeet t (Maybe a)
c (Maybe a -> IO ()) -> (a -> Maybe a) -> a -> IO ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> Maybe a
forall a. a -> Maybe a
Just) [a]
l IO () -> IO () -> IO ()
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> t (Maybe a) -> Maybe a -> IO ()
forall (t :: * -> *) a. Transport t => t a -> a -> IO ()
yeet t (Maybe a)
c Maybe a
forall a. Maybe a
Nothing