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.
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.
forkManagedUnmask :: ThreadManager -> String -> ((forall x . () => IO x -> IO x) -> IO ()) -> IO ()time-manager System.ThreadManager Like forkManaged, but run action with exceptions masked
formatTimeRFC2822 :: TextualMonoid t => ZonedTime -> ttimerep Data.Time.RFC2822 No documentation available.
formatDateRFC3339 :: (TextualMonoid t, FormatTime time) => time -> ttimerep Data.Time.RFC3339 No documentation available.
formatTimeRFC3339 :: TextualMonoid t => ZonedTime -> ttimerep Data.Time.RFC3339 No documentation available.
formatTimeRFC822 :: TextualMonoid t => ZonedTime -> ttimerep Data.Time.RFC822 No documentation available.
forever :: Applicative f => f a -> f bturtle 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.-
turtle Turtle.Format Convert a Format string to a print function that takes zero or more typed arguments and returns a Text string
fork :: MonadManaged managed => IO a -> managed (Async a)turtle Turtle.Prelude Fork a thread, acquiring an Async value
foreignPtrToPtr :: ForeignPtr a -> Ptr aunsafe System.Unsafe No documentation available.