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.

  1. 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.

  2. 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

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

    turtle Turtle.Prelude

    Fork a thread, acquiring an Async value

  4. foreignPtrToPtr :: ForeignPtr a -> Ptr a

    unsafe System.Unsafe

    No documentation available.

  5. formDataFiles :: FormDataResult a -> [File a]

    webgear-core WebGear.Core.MIMETypes

    No documentation available.

  6. formDataParams :: FormDataResult a -> [Param]

    webgear-core WebGear.Core.MIMETypes

    No documentation available.

  7. forbidden403 :: Set h Status => h () (With Response '[Status])

    webgear-core WebGear.Core.Trait.Status

    Forbidden 403 response

  8. forestGreen :: Color (SRGB 'NonLinear) Word8

    Color Graphics.Color.Standard.SVG

    Defined in SVG1.1 as

    forestgreen = rgb(34, 139, 34)
    

    Example

    >>> import Codec.Picture as JP
    
    >>> import Codec.Picture.Png (writePng)
    
    >>> let ColorSRGB r g b = forestGreen
    
    >>> let img = JP.generateImage (\_ _ -> JP.PixelRGB8 r g b) 200 34
    
    >>> writePng "files/svg/ForestGreen.png" img
    

  9. 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.

  10. foreverExcept :: forall (m :: Type -> Type) e a . (Functor m, Monad m) => StreamT (ExceptT e m) a -> StreamT m a

    automaton Data.Stream

    Execute the stream until it throws an exception, then restart it. One might be tempted to define this function recursively with applyExcept, but this would result in a runtime error, trying to define an infinite state.

Page 93 of many | Previous | Next