Hoogle Search

Within LTS Haskell 24.49 (ghc-9.10.3)

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

  1. forkOSWithUnmask :: ((forall a . () => IO a -> IO a) -> IO ()) -> IO ThreadId

    protolude Protolude

    Like forkIOWithUnmask, but the child thread is a bound thread, as with forkOS.

  2. forkOn :: Int -> IO () -> IO ThreadId

    protolude Protolude

    Like forkIO, but lets you specify on which capability the thread should run. Unlike a forkIO thread, a thread created by forkOn will stay on the same capability for its entire lifetime (forkIO threads can migrate between capabilities according to the scheduling policy). forkOn is useful for overriding the scheduling policy when you know in advance how best to distribute the threads. The Int argument specifies a capability number (see getNumCapabilities). Typically capabilities correspond to physical processors, but the exact behaviour is implementation-dependent. The value passed to forkOn is interpreted modulo the total number of capabilities as returned by getNumCapabilities. GHC note: the number of capabilities is specified by the +RTS -N option when the program is started. Capabilities can be fixed to actual processor cores with +RTS -qa if the underlying operating system supports that, although in practice this is usually unnecessary (and may actually degrade performance in some cases - experimentation is recommended).

  3. forkOnWithUnmask :: Int -> ((forall a . () => IO a -> IO a) -> IO ()) -> IO ThreadId

    protolude Protolude

    Like forkIOWithUnmask, but the child thread is pinned to the given CPU, as with forkOn.

  4. foreach :: Functor f => f a -> (a -> b) -> f b

    protolude Protolude.Functor

    No documentation available.

  5. forever :: Applicative f => f a -> f b

    protolude Protolude.Monad

    Repeat an action indefinitely.

    Examples

    A common use of forever is to process input from network sockets, Handles, and channels (e.g. MVar and Chan). For example, here is how we might implement an echo server, using forever both to listen for client connections on a network socket and to echo client input on client connection handles:
    echoServer :: Socket -> IO ()
    echoServer socket = forever $ do
    client <- accept socket
    forkFinally (echo client) (\_ -> hClose client)
    where
    echo :: Handle -> IO ()
    echo client = forever $
    hGetLine client >>= hPutStrLn client
    
    Note that "forever" isn't necessarily non-terminating. If the action is in a MonadPlus and short-circuits after some number of iterations. then forever actually returns mzero, effectively short-circuiting its caller.

  6. forIntersectionWithImmutable_ :: MonadIO m => FastMutableIntMap a -> IntMap b -> (a -> b -> m ()) -> m ()

    reflex Data.FastMutableIntMap

    Runs the provided action over the intersection of a FastMutableIntMap and an IntMap

  7. for_ :: MonadIO m => FastMutableIntMap a -> (a -> m ()) -> m ()

    reflex Data.FastMutableIntMap

    Runs the provided action over the values of a FastMutableIntMap

  8. formatCostCentreTree :: CostCentreTree -> IO String

    reflex Reflex.Profiled

    No documentation available.

  9. forRequesterData :: forall request response m . Applicative m => RequesterData request -> (forall a . () => request a -> m (response a)) -> m (RequesterData response)

    reflex Reflex.Requester.Base

    traverseRequesterData with its arguments flipped

  10. forRequesterData :: forall request response m . Applicative m => RequesterData request -> (forall a . () => request a -> m (response a)) -> m (RequesterData response)

    reflex Reflex.Requester.Base.Internal

    traverseRequesterData with its arguments flipped

Page 64 of many | Previous | Next