Hoogle Search
Within LTS Haskell 24.34 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
HaTeX Text.LaTeX.Base.Math For all symbol, <math>.
-
HaTeX Text.LaTeX.Packages.AMSMath For all symbol, <math>.
foreignlanguage :: LaTeXC l => Language -> l -> lHaTeX Text.LaTeX.Packages.Babel The function foreignlanguage takes two arguments; the second argument is a phrase to be typeset according to the rules of the language named in its first argument.
forceShutdown :: FrontendSession -> IO ()LambdaHack Game.LambdaHack.Client.UI.Frontend.Sdl No documentation available.
forkChild :: MVar [Async ()] -> IO () -> IO ()LambdaHack Game.LambdaHack.Common.Thread No documentation available.
forApplyEffect :: Effect -> BoolLambdaHack Game.LambdaHack.Content.ItemKind Whether the effect has a chance of exhibiting any potentially noticeable behaviour, except when the item is destroyed or combined. We assume at least one of OneOf effects must be noticeable.
forDamageEffect :: Effect -> BoolLambdaHack Game.LambdaHack.Content.ItemKind Whether a non-nested effect always applies raw damage.
forM :: (Traversable t, Monad m) => t a -> (a -> m b) -> m (t b)LambdaHack Game.LambdaHack.Core.Prelude forM is mapM with its arguments flipped. For a version that ignores the results see forM_.
forM_ :: (Foldable t, Monad m) => t a -> (a -> m ()) -> m ()LambdaHack Game.LambdaHack.Core.Prelude This has a more specific type (unit result) than normally, to catch errors.
forever :: Applicative f => f a -> f bLambdaHack 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.