Hoogle Search
Within LTS Haskell 24.52 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
tryReadTMVar :: TMVar a -> STM (Maybe a)relude Relude.Lifted.Concurrent A version of readTMVar which does not retry. Instead it returns Nothing if no value is available.
class Monad m =>
MonadReader r (m :: Type -> Type) | m -> rrelude Relude.Monad.Reexport See examples in Control.Monad.Reader. Note, the partially applied function type (->) r is a simple reader monad. See the instance declaration below.
runReader :: Reader r a -> r -> arelude Relude.Monad.Reexport Runs a Reader and extracts the final value from it. (The inverse of reader.)
runReaderT :: ReaderT r (m :: Type -> Type) a -> r -> m arelude Relude.Monad.Reexport No documentation available.
withReader :: (r' -> r) -> Reader r a -> Reader r' arelude Relude.Monad.Reexport Execute a computation in a modified environment (a specialization of withReaderT).
runReader (withReader f m) = runReader m . f
withReaderT :: forall r' r (m :: Type -> Type) a . (r' -> r) -> ReaderT r m a -> ReaderT r' m arelude Relude.Monad.Reexport Execute a computation in a modified environment (a more general version of local).
runReaderT (withReaderT f m) = runReaderT m . f
etaReaderT :: forall r (m :: Type -> Type) a . ReaderT r m a -> ReaderT r m arelude Relude.Monad.Trans This function helps with optimizing performance when working with the ReaderT transformer. If you have code like below, that is called in a loop
step :: Instruction -> ReaderT Config IO Result step instruction = case instruction of Add -> do stuff ... Del -> do stuff ...
you can improve performance of your Haskell applications by using etaReaderT in the following way:step :: Instruction -> ReaderT Config IO Result step instruction = etaReaderT $ case instruction of Add -> do stuff ... Del -> do stuff ...
For a detailed explanation, refer to the following blog post:usingReader :: r -> Reader r a -> arelude Relude.Monad.Trans Shorter and more readable alias for flip runReader.
>>> usingReader 42 $ asks (+5) 47
usingReaderT :: r -> ReaderT r m a -> m arelude Relude.Monad.Trans Shorter and more readable alias for flip runReaderT.
>>> usingReaderT 42 $ asks (+5) 47
processThread :: LocalProcess -> !ThreadIddistributed-process Control.Distributed.Process.Internal.Types No documentation available.