Hoogle Search

Within LTS Haskell 24.46 (ghc-9.10.3)

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

  1. class ReifyMaybeSymbol (mstr :: Maybe Symbol)

    bytezap Bytezap.Parser.Struct.Generic

    No documentation available.

  2. reifyMaybeSymbol :: ReifyMaybeSymbol mstr => Maybe String

    bytezap Bytezap.Parser.Struct.Generic

    No documentation available.

  3. ByMaybeAttr :: WhyNullable

    classy-prelude-yesod ClassyPrelude.Yesod

    No documentation available.

  4. FieldAttrMaybe :: FieldAttr

    classy-prelude-yesod ClassyPrelude.Yesod

    The Maybe keyword goes after the type. This indicates that the column is nullable, and the generated Haskell code will have a Maybe type for it. Example:

    User
    name Text Maybe
    

  5. asMaybe :: Maybe a -> Maybe a

    classy-prelude-yesod ClassyPrelude.Yesod

    No documentation available.

  6. catMaybes :: (IsSequence (f (Maybe t)), Functor f, Element (f (Maybe t)) ~ Maybe t) => f (Maybe t) -> f t

    classy-prelude-yesod ClassyPrelude.Yesod

    Takes all of the Just values from a sequence of Maybe ts and concatenates them into an unboxed sequence of ts. Since 0.6.2

  7. fromMaybe :: a -> Maybe a -> a

    classy-prelude-yesod ClassyPrelude.Yesod

    The fromMaybe function takes a default value and a Maybe value. If the Maybe is Nothing, it returns the default value; otherwise, it returns the value contained in the Maybe.

    Examples

    Basic usage:
    >>> fromMaybe "" (Just "Hello, World!")
    "Hello, World!"
    
    >>> fromMaybe "" Nothing
    ""
    
    Read an integer from a string using readMaybe. If we fail to parse an integer, we want to return 0 by default:
    >>> import GHC.Internal.Text.Read ( readMaybe )
    
    >>> fromMaybe 0 (readMaybe "5")
    5
    
    >>> fromMaybe 0 (readMaybe "")
    0
    

  8. fuseBothMaybe :: forall (m :: Type -> Type) a b r1 c r2 . Monad m => ConduitT a b m r1 -> ConduitT b c m r2 -> ConduitT a c m (Maybe r1, r2)

    classy-prelude-yesod ClassyPrelude.Yesod

    Like fuseBoth, but does not force consumption of the Producer. In the case that the Producer terminates, the result value is provided as a Just value. If it does not terminate, then a Nothing value is returned. One thing to note here is that "termination" here only occurs if the Producer actually yields a Nothing value. For example, with the Producer mapM_ yield [1..5], if five values are requested, the Producer has not yet terminated. Termination only occurs when the sixth value is awaited for and the Producer signals termination. Since 1.2.4

  9. isFieldMaybe :: FieldDef -> Bool

    classy-prelude-yesod ClassyPrelude.Yesod

    Check if the field is `Maybe a`

  10. listToMaybe :: [a] -> Maybe a

    classy-prelude-yesod ClassyPrelude.Yesod

    The listToMaybe function returns Nothing on an empty list or Just a where a is the first element of the list.

    Examples

    Basic usage:
    >>> listToMaybe []
    Nothing
    
    >>> listToMaybe [9]
    Just 9
    
    >>> listToMaybe [1,2,3]
    Just 1
    
    Composing maybeToList with listToMaybe should be the identity on singleton/empty lists:
    >>> maybeToList $ listToMaybe [5]
    [5]
    
    >>> maybeToList $ listToMaybe []
    []
    
    But not on lists with more than one element:
    >>> maybeToList $ listToMaybe [1,2,3]
    [1]
    

Page 295 of many | Previous | Next