Hoogle Search

Within LTS Haskell 24.67 (ghc-9.10.3)

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

  1. CombineTypesRequiresRecordType :: Expr s a -> Expr s a -> TypeMessage s a

    dhall Dhall.TypeCheck

    No documentation available.

  2. NotAnEquivalence :: Expr s a -> TypeMessage s a

    dhall Dhall.TypeCheck

    No documentation available.

  3. dequeue :: Ord k => PriorityQ k v -> Maybe (v, PriorityQ k v)

    distributed-process-extras Control.Distributed.Process.Extras.Internal.Queue.PriorityQ

    No documentation available.

  4. module Control.Distributed.Process.Extras.Internal.Queue.SeqQ

    No documentation available.

  5. data SeqQ a

    distributed-process-extras Control.Distributed.Process.Extras.Internal.Queue.SeqQ

    No documentation available.

  6. dequeue :: SeqQ a -> Maybe (a, SeqQ a)

    distributed-process-extras Control.Distributed.Process.Extras.Internal.Queue.SeqQ

    No documentation available.

  7. SeqForkUnlift :: UnliftStrategy

    effectful-core Effectful

    Like SeqUnlift, but all unlifted actions will be executed in a cloned environment. The main consequence is that thread local state is forked at the point of creation of the unlifting function and its modifications in unlifted actions will not affect the main thread of execution (and vice versa):

    >>> import Effectful
    
    >>> import Effectful.State.Dynamic
    
    >>> :{
    action :: (IOE :> es, State Int :> es) => Eff es ()
    action = do
    modify @Int (+1)
    withEffToIO SeqForkUnlift $ \unlift -> unlift $ modify @Int (+2)
    modify @Int (+4)
    :}
    
    >>> runEff . execStateLocal @Int 0 $ action
    5
    
    >>> runEff . execStateShared @Int 0 $ action
    7
    
    Because of this it's possible to safely use the unlifting function outside of the scope of effects it captures, e.g. by creating an IO action that executes effectful operations and running it later:
    >>> :{
    delayed :: UnliftStrategy -> IO (IO String)
    delayed strategy = runEff . evalStateLocal "Hey" $ do
    r <- withEffToIO strategy $ \unlift -> pure $ unlift get
    modify (++ "!!!")
    pure r
    :}
    
    This doesn't work with the SeqUnlift strategy because when the returned action runs, State is no longer in scope:
    >>> join $ delayed SeqUnlift
    *** Exception: version (...) /= storageVersion (0)
    ...
    
    However, it does with the SeqForkUnlift strategy:
    >>> join $ delayed SeqForkUnlift
    "Hey"
    

  8. SeqUnlift :: UnliftStrategy

    effectful-core Effectful

    The sequential strategy is the fastest and a default setting for IOE. Any attempt of calling the unlifting function in threads distinct from its creator will result in a runtime error.

  9. withSeqEffToIO :: forall (es :: [Effect]) a . (HasCallStack, IOE :> es) => ((forall r . () => Eff es r -> IO r) -> IO a) -> Eff es a

    effectful-core Effectful

    Create an unlifting function with the SeqUnlift strategy. For the general version see withEffToIO. Note: usage of this function is preferrable to withRunInIO because of explicit unlifting strategy and better error reporting.

  10. localSeqBorrow :: forall (borrowedEs :: [Effect]) (es :: [Effect]) (handlerEs :: [Effect]) (localEs :: [Effect]) a . (HasCallStack, KnownSubset borrowedEs localEs, SharedSuffix es handlerEs) => LocalEnv localEs handlerEs -> ((forall r . () => Eff (borrowedEs ++ es) r -> Eff es r) -> Eff es a) -> Eff es a

    effectful-core Effectful.Dispatch.Dynamic

    Borrow effects from the local environment.

Page 482 of many | Previous | Next