Hoogle Search

Within LTS Haskell 24.48 (ghc-9.10.3)

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

  1. forkManagedTimeoutFinally :: ThreadManager -> String -> (Handle -> IO ()) -> IO () -> IO ()

    time-manager System.ThreadManager

    Fork a managed thread with a handle created by a timeout manager and with a cleanup function.

  2. forkManagedUnmask :: ThreadManager -> String -> ((forall x . () => IO x -> IO x) -> IO ()) -> IO ()

    time-manager System.ThreadManager

    Like forkManaged, but run action with exceptions masked

  3. formatTimeRFC2822 :: TextualMonoid t => ZonedTime -> t

    timerep Data.Time.RFC2822

    No documentation available.

  4. formatDateRFC3339 :: (TextualMonoid t, FormatTime time) => time -> t

    timerep Data.Time.RFC3339

    No documentation available.

  5. formatTimeRFC3339 :: TextualMonoid t => ZonedTime -> t

    timerep Data.Time.RFC3339

    No documentation available.

  6. formatTimeRFC822 :: TextualMonoid t => ZonedTime -> t

    timerep Data.Time.RFC822

    No documentation available.

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

    turtle Turtle

    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. format :: Format Text r -> r

    turtle Turtle.Format

    Convert a Format string to a print function that takes zero or more typed arguments and returns a Text string

  9. fork :: MonadManaged managed => IO a -> managed (Async a)

    turtle Turtle.Prelude

    Fork a thread, acquiring an Async value

  10. foreignPtrToPtr :: ForeignPtr a -> Ptr a

    unsafe System.Unsafe

    No documentation available.

Page 93 of many | Previous | Next