Hoogle Search

Within LTS Haskell 24.36 (ghc-9.10.3)

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

  1. maybeToList :: Maybe a -> [a]

    classy-prelude ClassyPrelude

    The maybeToList function returns an empty list when given Nothing or a singleton list when given Just.

    Examples

    Basic usage:
    >>> maybeToList (Just 7)
    [7]
    
    >>> maybeToList Nothing
    []
    
    One can use maybeToList to avoid pattern matching when combined with a function that (safely) works on lists:
    >>> import GHC.Internal.Text.Read ( readMaybe )
    
    >>> sum $ maybeToList (readMaybe "3")
    3
    
    >>> sum $ maybeToList (readMaybe "")
    0
    

  2. maybeArray :: (PersistField a, PersistField [a]) => SqlExpr (Value (Maybe [a])) -> SqlExpr (Value [a])

    esqueleto Database.Esqueleto.PostgreSQL

    Coalesce an array with an empty default value

  3. maybePop :: Maybe a -> [BufferCommand b]

    essence-of-live-coding LiveCoding.Cell.Util

    Pops on Just a and does nothing on Nothing.

  4. maybePush :: Maybe a -> [BufferCommand a]

    essence-of-live-coding LiveCoding.Cell.Util

    Pushes Just a and does nothing on Nothing.

  5. maybeMigrateFromExceptState :: (Typeable state, Typeable state') => ExceptState state e -> Maybe state'

    essence-of-live-coding LiveCoding.Migrate.Cell

    No documentation available.

  6. maybeMigrateFromPair :: (Typeable a, Typeable b, Typeable c) => (t a b -> a) -> (t a b -> b) -> t a b -> Maybe c

    essence-of-live-coding LiveCoding.Migrate.Cell

    Like maybeMigrateToPair, but in the other direction. Again, it is biased with respect to the first element of the pair.

  7. maybeMigrateToExceptState :: (Typeable state, Typeable state') => ExceptState state e -> state' -> Maybe (ExceptState state e)

    essence-of-live-coding LiveCoding.Migrate.Cell

    No documentation available.

  8. maybeMigrateToPair :: (Typeable a, Typeable b, Typeable c) => (t a b -> a) -> (t a b -> b) -> (a -> b -> t a b) -> t a b -> c -> Maybe (t a b)

    essence-of-live-coding LiveCoding.Migrate.Cell

    Builds the migration function for a pair, or product type, such as tuples, but customisable to your own products. You need to pass it the equivalents of fst, snd, and (,). Tries to migrate the value into the first element, then into the second.

  9. maybeMigrateFromDebugging :: (Typeable state', Typeable state) => Debugging dbgState state -> Maybe state'

    essence-of-live-coding LiveCoding.Migrate.Debugger

    No documentation available.

  10. maybeMigrateToDebugging :: (Typeable state', Typeable state) => Debugging dbgState state -> state' -> Maybe (Debugging dbgState state)

    essence-of-live-coding LiveCoding.Migrate.Debugger

    No documentation available.

Page 30 of many | Previous | Next