liblawless-0.26.0: Prelude based on protolude for GHC 8 and beyond.

Copyright© 2017 All rights reserved.
LicenseGPL-3
MaintainerEvan Cofsky <evan@theunixman.com>
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

STM.Base

Description

 

Synopsis

Documentation

module IO.Base

data STM a :: * -> * #

A monad supporting atomic memory transactions.

Instances

Monad STM

Since: 4.3.0.0

Methods

(>>=) :: STM a -> (a -> STM b) -> STM b #

(>>) :: STM a -> STM b -> STM b #

return :: a -> STM a #

fail :: String -> STM a #

Functor STM

Since: 4.3.0.0

Methods

fmap :: (a -> b) -> STM a -> STM b #

(<$) :: a -> STM b -> STM a #

Applicative STM

Since: 4.8.0.0

Methods

pure :: a -> STM a #

(<*>) :: STM (a -> b) -> STM a -> STM b #

liftA2 :: (a -> b -> c) -> STM a -> STM b -> STM c #

(*>) :: STM a -> STM b -> STM b #

(<*) :: STM a -> STM b -> STM a #

Alternative STM

Since: 4.8.0.0

Methods

empty :: STM a #

(<|>) :: STM a -> STM a -> STM a #

some :: STM a -> STM [a] #

many :: STM a -> STM [a] #

MonadPlus STM

Since: 4.3.0.0

Methods

mzero :: STM a #

mplus :: STM a -> STM a -> STM a #

MonadThrow STM 

Methods

throwM :: Exception e => e -> STM a #

MonadCatch STM 

Methods

catch :: Exception e => STM a -> (e -> STM a) -> STM a #

MonadBaseControl STM STM 

Associated Types

type StM (STM :: * -> *) a :: * #

Methods

liftBaseWith :: (RunInBase STM STM -> STM a) -> STM a #

restoreM :: StM STM a -> STM a #

MonadBase STM STM 

Methods

liftBase :: STM α -> STM α #

type StM STM a 
type StM STM a = a

atomically :: MonadBase IO m => STM α -> m α Source #

newTVarIO :: MonadBase IO m => a -> m (TVar a) Source #

newTVarIO at the top level, lifted.

newTMVarIO :: MonadBase IO m => a -> m (TMVar a) Source #

newTMVarIO at the top level, lifted.

newEmptyTMVarIO :: MonadBase IO m => m (TMVar a) Source #

newTMVarIO at the top level, lifted.

newTBChanIO :: (MonadBase IO m, Integral l) => l -> m (TBChan a) Source #

newTBChanIO at the top level, lifted, only with a saturated length.

newTBChan :: Integral l => l -> STM (TBChan a) Source #