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. forDamageEffect :: Effect -> Bool

    LambdaHack Game.LambdaHack.Content.ItemKind

    Whether a non-nested effect always applies raw damage.

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

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

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

  5. fork :: ParIVar ivar m => m () -> m ()

    abstract-par Control.Monad.Par.Class

    Forks a computation to happen in parallel. The forked computation may exchange values with other computations using IVars.

  6. formatPointer :: Pointer -> Text

    aeson-diff Data.Aeson.Pointer

    Format a Pointer as described in RFC 6901.

    >>> formatPointer (Pointer [])
    ""
    
    >>> formatPointer (Pointer [OKey ""])
    "/"
    
    >>> formatPointer (Pointer [OKey " "])
    "/ "
    
    >>> formatPointer (Pointer [OKey "foo"])
    "/foo"
    
    >>> formatPointer (Pointer [OKey "foo", AKey 0])
    "/foo/0"
    
    >>> formatPointer (Pointer [OKey "a/b"])
    "/a~1b"
    
    >>> formatPointer (Pointer [OKey "c%d"])
    "/c%d"
    
    >>> formatPointer (Pointer [OKey "e^f"])
    "/e^f"
    
    >>> formatPointer (Pointer [OKey "g|h"])
    "/g|h"
    
    >>> formatPointer (Pointer [OKey "i\\j"])
    "/i\\j"
    
    >>> formatPointer (Pointer [OKey "k\"l"])
    "/k\"l"
    
    >>> formatPointer (Pointer [OKey "m~n"])
    "/m~0n"
    

  7. forest :: Forest a -> Graph a

    algebraic-graphs Algebra.Graph

    The forest graph constructed from a given Forest data structure. Complexity: O(F) time, memory and size, where F is the size of the given forest (i.e. the number of vertices in the forest).

    forest []                                                  == empty
    forest [x]                                                 == tree x
    forest [Node 1 [Node 2 [], Node 3 []], Node 4 [Node 5 []]] == edges [(1,2), (1,3), (4,5)]
    forest                                                     == overlays . map tree
    

  8. forest :: Forest Int -> AdjacencyIntMap

    algebraic-graphs Algebra.Graph.AdjacencyIntMap

    The forest graph constructed from a given Forest data structure. Complexity: O((n + m) * log(n)) time and O(n + m) memory.

    forest []                                                  == empty
    forest [x]                                                 == tree x
    forest [Node 1 [Node 2 [], Node 3 []], Node 4 [Node 5 []]] == edges [(1,2), (1,3), (4,5)]
    forest                                                     == overlays . map tree
    

  9. forest :: Ord a => Forest a -> AdjacencyMap a

    algebraic-graphs Algebra.Graph.AdjacencyMap

    The forest graph constructed from a given Forest data structure. Complexity: O((n + m) * log(n)) time and O(n + m) memory.

    forest []                                                  == empty
    forest [x]                                                 == tree x
    forest [Node 1 [Node 2 [], Node 3 []], Node 4 [Node 5 []]] == edges [(1,2), (1,3), (4,5)]
    forest                                                     == overlays . map tree
    

  10. forest :: Graph g => Forest (Vertex g) -> g

    algebraic-graphs Algebra.Graph.Class

    The forest graph constructed from a given Forest data structure. Complexity: O(F) time, memory and size, where F is the size of the given forest (i.e. the number of vertices in the forest).

    forest []                                                  == empty
    forest [x]                                                 == tree x
    forest [Node 1 [Node 2 [], Node 3 []], Node 4 [Node 5 []]] == edges [(1,2), (1,3), (4,5)]
    forest                                                     == overlays . map tree
    

Page 131 of many | Previous | Next