Hoogle Search

Within LTS Haskell 24.51 (ghc-9.10.3)

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

  1. maybeToEnum :: MessageEnum a => Int -> Maybe a

    proto-lens Data.ProtoLens.Message

    Convert the given Int to an enum value. Returns Nothing if no corresponding value was defined in the .proto file.

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

    protolude Protolude

    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
    

  3. maybeEmpty :: Monoid b => (a -> b) -> Maybe a -> b

    protolude Protolude.Either

    No documentation available.

  4. maybeToEither :: e -> Maybe a -> Either e a

    protolude Protolude.Either

    No documentation available.

  5. maybeToLeft :: r -> Maybe l -> Either l r

    protolude Protolude.Either

    No documentation available.

  6. maybeToRight :: l -> Maybe r -> Either l r

    protolude Protolude.Either

    No documentation available.

  7. maybeDCaseE :: MatchContext -> DExp -> [DMatch] -> DExp

    th-desugar Language.Haskell.TH.Desugar

    If matches is non-empty, make a case statement; otherwise make an error statement

  8. maybeDLetE :: [DLetDec] -> DExp -> DExp

    th-desugar Language.Haskell.TH.Desugar

    If decs is non-empty, delcare them in a let:

  9. maybeToAttr :: (String -> a -> Maybe Attribute) -> String -> Maybe a -> Maybe Attribute

    HaXml Text.XML.HaXml.XmlContent.Parser

    No documentation available.

  10. maybeToEither :: MonadError e m => e -> Maybe a -> m a

    MissingH Data.Either.Utils

    Converts a Maybe value to an Either value, using the supplied parameter as the Left value if the Maybe is Nothing. This function can be interpreted as:

    maybeToEither :: e -> Maybe a -> Either e a
    
    Its definition is given as it is so that it can be used in the Error and related monads.

Page 43 of many | Previous | Next