Hoogle Search

Within LTS Haskell 24.2 (ghc-9.10.2)

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

  1. forever :: forall (m :: Type -> Type) a b e . Monad m => AutomatonExcept a b m e -> Automaton m a b

    automaton Data.Automaton.Trans.Except

    No documentation available.

  2. forever :: forall (m :: Type -> Type) a e . Monad m => StreamExcept a m e -> OptimizedStreamT m a

    automaton Data.Stream.Except

    No documentation available.

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

    LambdaHack Game.LambdaHack.Core.Prelude

    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.

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

    incipit-base Incipit.Base

    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.

  5. forever :: Dsl k r a => k r a -> r

    control-dsl Control.Dsl

    No documentation available.

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

    control-monad-free Control.Monad.Free

    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.

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

    distribution-opensuse OpenSuse.Prelude

    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.

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

    classy-prelude-yesod ClassyPrelude.Yesod

    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.

  9. forever :: (Monad m k, Function k, Arrow k (->), Object k a, Object k b, Object k (m a), Object k (m (m a)), ObjectPoint k (m b), Object k (m (m b))) => k (m a) (m b)

    constrained-categories Control.Monad.Constrained

    No documentation available.

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

    verset Verset

    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.

Page 2 of many | Previous | Next