    -- | Lifted "Control.Concurrent.Chan".
    --
    -- @since 0.1.0.0
    module UnliftIO.Chan
      ( Chan
      , newChan
      , writeChan
      , readChan
      , dupChan
      , getChanContents
      , writeList2Chan
      ) where

    import Control.Monad.IO.Unlift
    import Control.Concurrent.Chan (Chan)
    import qualified Control.Concurrent.Chan as C

    -- | Lifted 'C.newChan'.
    --
    -- @since 0.1.0.0
    newChan :: MonadIO m => m (Chan a)
    newChan :: m (Chan a)
    newChan = IO (Chan a) -> m (Chan a)
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO IO (Chan a)
    forall a. IO (Chan a)
    C.newChan

    -- | Lifted 'C.writeChan'.
    --
    -- @since 0.1.0.0
    writeChan :: MonadIO m => Chan a -> a -> m ()
    writeChan :: Chan a -> a -> m ()
    writeChan c :: Chan a
    c = IO () -> m ()
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO () -> m ()) -> (a -> IO ()) -> a -> m ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Chan a -> a -> IO ()
    forall a. Chan a -> a -> IO ()
    C.writeChan Chan a
    c

    -- | Lifted 'C.readChan'.
    --
    -- @since 0.1.0.0
    readChan :: MonadIO m => Chan a -> m a
    readChan :: Chan a -> m a
    readChan = IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO a -> m a) -> (Chan a -> IO a) -> Chan a -> m a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Chan a -> IO a
    forall a. Chan a -> IO a
    C.readChan

    -- | Lifted 'C.dupChan'.
    --
    -- @since 0.1.0.0
    dupChan :: MonadIO m => Chan a -> m (Chan a)
    dupChan :: Chan a -> m (Chan a)
    dupChan = IO (Chan a) -> m (Chan a)
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (Chan a) -> m (Chan a))
    -> (Chan a -> IO (Chan a)) -> Chan a -> m (Chan a)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Chan a -> IO (Chan a)
    forall a. Chan a -> IO (Chan a)
    C.dupChan

    -- | Lifted 'C.getChanContents'.
    --
    -- @since 0.1.0.0
    getChanContents :: MonadIO m => Chan a -> m [a]
    getChanContents :: Chan a -> m [a]
    getChanContents = IO [a] -> m [a]
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO [a] -> m [a]) -> (Chan a -> IO [a]) -> Chan a -> m [a]
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Chan a -> IO [a]
    forall a. Chan a -> IO [a]
    C.getChanContents

    -- | Lifted 'C.writeList2Chan'.
    --
    -- @since 0.1.0.0
    writeList2Chan :: MonadIO m => Chan a -> [a] -> m ()
    writeList2Chan :: Chan a -> [a] -> m ()
    writeList2Chan c :: Chan a
    c = IO () -> m ()
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO () -> m ()) -> ([a] -> IO ()) -> [a] -> m ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Chan a -> [a] -> IO ()
    forall a. Chan a -> [a] -> IO ()
    C.writeList2Chan Chan a
    c