Hoogle Search

Within LTS Haskell 24.15 (ghc-9.10.3)

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

  1. runToEnd :: Recursive (->) t (Either a) => t -> a

    yaya Yaya.Applied

    This will collapse all the intermediate steps to get to the value that must exist at the end.

  2. constantly :: Corecursive (->) t (Pair a) => a -> t

    yaya Yaya.Applied

    Creates an infinite stream of the provided value.

  3. now :: Steppable (->) t (Either a) => a -> t

    yaya Yaya.Applied

    No documentation available.

  4. reverse :: (Recursive (->) t (XNor a), Steppable (->) u (XNor a)) => t -> u

    yaya Yaya.Applied

    No documentation available.

  5. return :: PolyCont (Return r') r Void => r' -> r

    control-dsl Control.Dsl

    Lift r to the answer type, similar to return. This return function aims to be used as the last statement of a do block. When return is present in a nested do block for when or unless, if the r' is not (), it will create a Cont that performs early return, skipping the rest statements of the outer do notation.

    Examples

    >>> :set -XTypeOperators
    
    >>> :set -XRebindableSyntax
    
    >>> import Prelude hiding ((>>), (>>=), return, fail)
    
    >>> import Control.Dsl
    
    >>> import Control.Dsl.Return
    
    >>> import Control.Dsl.Yield
    
    >>> import Control.Dsl.Cont
    
    >>> import Control.Dsl.Empty
    
    >>> :{
    earlyGenerator :: Bool -> Cont [String] Integer
    earlyGenerator earlyReturn = do
    Yield "inside earlyGenerator"
    when earlyReturn $ do
    Yield "early return"
    return 1
    Yield "normal return"
    return 0
    :}
    
    >>> :{
    earlyGeneratorTest :: [String]
    earlyGeneratorTest = do
    Yield "before earlyGenerator"
    i <- earlyGenerator True
    Yield "after earlyGenerator"
    Yield $ "the return value of earlyGenerator is " ++ show i
    empty
    :}
    
    >>> earlyGeneratorTest
    ["before earlyGenerator","inside earlyGenerator","early return","after earlyGenerator","the return value of earlyGenerator is 1"]
    

  6. return :: PolyCont (Return r') r Void => r' -> r

    control-dsl Control.Dsl.Return

    Lift r to the answer type, similar to return. This return function aims to be used as the last statement of a do block. When return is present in a nested do block for when or unless, if the r' is not (), it will create a Cont that performs early return, skipping the rest statements of the outer do notation.

    Examples

    >>> :set -XTypeOperators
    
    >>> :set -XRebindableSyntax
    
    >>> import Prelude hiding ((>>), (>>=), return, fail)
    
    >>> import Control.Dsl
    
    >>> import Control.Dsl.Return
    
    >>> import Control.Dsl.Yield
    
    >>> import Control.Dsl.Cont
    
    >>> import Control.Dsl.Empty
    
    >>> :{
    earlyGenerator :: Bool -> Cont [String] Integer
    earlyGenerator earlyReturn = do
    Yield "inside earlyGenerator"
    when earlyReturn $ do
    Yield "early return"
    return 1
    Yield "normal return"
    return 0
    :}
    
    >>> :{
    earlyGeneratorTest :: [String]
    earlyGeneratorTest = do
    Yield "before earlyGenerator"
    i <- earlyGenerator True
    Yield "after earlyGenerator"
    Yield $ "the return value of earlyGenerator is " ++ show i
    empty
    :}
    
    >>> earlyGeneratorTest
    ["before earlyGenerator","inside earlyGenerator","early return","after earlyGenerator","the return value of earlyGenerator is 1"]
    

  7. toFields :: Default ToFields haskells fields => haskells -> fields

    opaleye Opaleye.Internal.Constant

    No documentation available.

  8. toFields :: Default ToFields haskells fields => haskells -> fields

    opaleye Opaleye.ToFields

    toFields provides a convenient typeclass wrapper around the Field_ creation functions in Opaleye.SqlTypes. Besides convenience it doesn't provide any additional functionality. It can be used with functions like runInsert to insert custom Haskell types into the database. The following is an example of a function for inserting custom types.

    customInsert
    :: ( Default ToFields haskells fields )
    => Connection
    -> Table fields fields'
    -> [haskells]
    -> IO Int64
    customInsert conn table haskells = runInsert_ conn Insert {
    iTable      = table
    , iRows       = map toFields haskells
    , iReturning  = rCount
    , iOnConflict = Nothing
    }
    
    In order to use this function with your custom types, you need to define an instance of Default ToFields for your custom types.

  9. toFieldsI :: Default (Inferrable ToFields) haskells fields => haskells -> fields

    opaleye Opaleye.ToFields

    Version of toFields with better type inference

  10. show :: (Show a, StringConv String b) => a -> b

    protolude Protolude

    No documentation available.

Page 4 of many | Previous | Next