Hoogle Search

Within LTS Haskell 24.4 (ghc-9.10.2)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. newTVarIO :: a -> IO (TVar a)

    stm Control.Concurrent.STM.TVar

    No documentation available.

  2. readTVar :: TVar a -> STM a

    stm Control.Concurrent.STM.TVar

    No documentation available.

  3. readTVarIO :: TVar a -> IO a

    stm Control.Concurrent.STM.TVar

    No documentation available.

  4. stateTVar :: TVar s -> (s -> (a, s)) -> STM a

    stm Control.Concurrent.STM.TVar

    Like modifyTVar' but the function is a simple state transition that can return a side value which is passed on as the result of the STM.

  5. swapTVar :: TVar a -> a -> STM a

    stm Control.Concurrent.STM.TVar

    Swap the contents of a TVar for a new value.

  6. writeTVar :: TVar a -> a -> STM ()

    stm Control.Concurrent.STM.TVar

    No documentation available.

  7. data MutVar# a (b :: TYPE 'BoxedRep l)

    ghc-prim GHC.Prim

    A MutVar# behaves like a single-element mutable array.

  8. atomicModifyMutVar2# :: MutVar# d a -> (a -> c) -> State# d -> (# State# d, a, c #)

    ghc-prim GHC.Prim

    Modify the contents of a MutVar#, returning the previous contents x :: a and the result of applying the given function to the previous contents f x :: c. The data type c (not a newtype!) must be a record whose first field is of lifted type a :: Type and is not unpacked. For example, product types c ~ Solo a or c ~ (a, b) work well. If the record type is both monomorphic and strict in its first field, it's recommended to mark the latter {-# NOUNPACK #-} explicitly. Under the hood atomicModifyMutVar2# atomically replaces a pointer to an old x :: a with a pointer to a selector thunk fst r, where fst is a selector for the first field of the record and r is a function application thunk r = f x. atomicModifyIORef2Native from atomic-modify-general package makes an effort to reflect restrictions on c faithfully, providing a well-typed high-level wrapper.

  9. atomicModifyMutVar_# :: MutVar# d a -> (a -> a) -> State# d -> (# State# d, a, a #)

    ghc-prim GHC.Prim

    Modify the contents of a MutVar#, returning the previous contents and the result of applying the given function to the previous contents.

  10. atomicModifyMutVar2# :: MutVar# s a -> (a -> c) -> State# s -> (# State# s, a, c #)

    ghc-prim GHC.PrimopWrappers

    No documentation available.

Page 8 of many | Previous | Next