Hoogle Search

Within LTS Haskell 24.35 (ghc-9.10.3)

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

  1. forceBVar :: BVar s a -> ()

    backprop Numeric.Backprop.Internal

    No documentation available.

  2. forceInpRef :: InpRef a -> ()

    backprop Numeric.Backprop.Internal

    No documentation available.

  3. forceSomeTapeNode :: SomeTapeNode -> ()

    backprop Numeric.Backprop.Internal

    No documentation available.

  4. forceTapeNode :: TapeNode a -> ()

    backprop Numeric.Backprop.Internal

    No documentation available.

  5. foreignKeyColumns :: forall (ref :: (Type -> Type) -> Type) tbl . Beamable (PrimaryKey ref) => (tbl (TableField tbl) -> PrimaryKey ref (TableField tbl)) -> tbl (TableField tbl) -> NonEmpty Text

    beam-migrate Database.Beam.Migrate.Types

    Expand a foreign-key accessor into its constituent column-name references, for use with addTableIndex. Example:

    data UserT f = User
    { userId   :: C f Int32
    , userName :: C f Text
    }
    instance Table UserT where
    newtype PrimaryKey UserT f = UserId (C f Int32)
    primaryKey (User {userId = i}) = UserId i
    data OrderT f = Order
    { orderUser :: PrimaryKey UserT f
    , orderDate :: C f Day
    }
    
    addTableIndex "idx_orders_user" indexOptions
    (\t -> foreignKeyColumns orderUser t)
    
    Can be combined with selectorColumnName for composite indices.

  6. forEach :: forall a b (es :: Effects) r . (forall (e1 :: Effects) . () => Coroutine a b e1 -> Eff (e1 :& es) r) -> (a -> Eff es b) -> Eff es r

    bluefin-internal Bluefin.Internal

    Apply an effectful function to each element yielded to the stream.

    >>> runPureEff $ yieldToList $ \y -> do
    for_ [0 .. 4] $ \i -> do
    yield y i
    yield y (i * 10)
    ([0, 0, 1, 10, 2, 20, 3, 30], ())
    

  7. forEachExample :: ([Int], ())

    bluefin-internal Bluefin.Internal.Examples

    No documentation available.

  8. for_ :: (Foldable t, Applicative f) => t a -> (a -> f b) -> f ()

    cabal-install-solver Distribution.Solver.Compat.Prelude

    for_ is traverse_ with its arguments flipped. For a version that doesn't ignore the results see for. This is forM_ generalised to Applicative actions. for_ is just like forM_, but generalised to Applicative actions.

    Examples

    Basic usage:
    >>> for_ [1..4] print
    1
    2
    3
    4
    

  9. force :: NFData a => a -> a

    cabal-install-solver Distribution.Solver.Compat.Prelude

    a variant of deepseq that is useful in some circumstances:

    force x = x `deepseq` x
    
    force x fully evaluates x, and then returns it. Note that force x only performs evaluation when the value of force x itself is demanded, so essentially it turns shallow evaluation into deep evaluation. force can be conveniently used in combination with ViewPatterns:
    {-# LANGUAGE BangPatterns, ViewPatterns #-}
    import Control.DeepSeq
    
    someFun :: ComplexData -> SomeResult
    someFun (force -> !arg) = {- 'arg' will be fully evaluated -}
    
    Another useful application is to combine force with evaluate in order to force deep evaluation relative to other IO operations:
    import Control.Exception (evaluate)
    import Control.DeepSeq
    
    main = do
    result <- evaluate $ force $ pureComputation
    {- 'result' will be fully evaluated at this point -}
    return ()
    
    Finally, here's an exception safe variant of the readFile' example:
    readFile' :: FilePath -> IO String
    readFile' fn = bracket (openFile fn ReadMode) hClose $ \h ->
    evaluate . force =<< hGetContents h
    

  10. forgetLabels :: Graph e -> Graph

    cabal-install-solver Distribution.Solver.Modular.LabeledGraph

    No documentation available.

Page 132 of many | Previous | Next