Hoogle Search

Within LTS Haskell 24.38 (ghc-9.10.3)

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

  1. fromMaybeOr :: Maybe a -> a -> a

    from-sum Control.FromSum

    A fliped version of fromMaybe.

  2. fromMaybeOrExceptT :: forall (m :: Type -> Type) a x . Monad m => Maybe a -> x -> ExceptT x m a

    from-sum Control.FromSum

    Just like fromMaybeExceptT but with the arguments flipped.

  3. fromMaybeOrM :: Applicative m => Maybe a -> m a -> m a

    from-sum Control.FromSum

    A fliped version of fromMaybeM.

    >>> fromMaybeOrM (Just 5) []
    [5]
    
    This can be nice to use as an error handler.
    >>> fromMaybeOrM (Just 5) $ putStrLn "some error occurred" >> undefined
    5
    
    >>> fromMaybeOrM (Nothing) $ putStrLn "some error occurred" >> undefined
    some error occurred
    ...
    

  4. fromMaybeOrMExceptT :: Monad m => m (Maybe a) -> x -> ExceptT x m a

    from-sum Control.FromSum

    Just like fromMaybeMExceptT but with the arguments flipped.

  5. fromMaybeOrMM :: Monad m => m (Maybe a) -> m a -> m a

    from-sum Control.FromSum

    A fliped version of fromMaybeMM.

  6. fromMaybeOrM_ :: (Applicative m, Monoid b) => Maybe a -> m b -> m b

    from-sum Control.FromSum

    A fliped version of fromMaybeM.

  7. parseFrontmatterMaybe :: ByteString -> Maybe ByteString

    frontmatter Data.Frontmatter

    parseFrontmatter but returning a Maybe

  8. parseYamlFrontmatterMaybe :: FromJSON a => ByteString -> Maybe a

    frontmatter Data.Frontmatter

    parseYamlFrontmatter but returning a Maybe

  9. catMaybes :: [Maybe a] -> [a]

    github GitHub.Internal.Prelude

    The catMaybes function takes a list of Maybes and returns a list of all the Just values.

    Examples

    Basic usage:
    >>> catMaybes [Just 1, Nothing, Just 3]
    [1,3]
    
    When constructing a list of Maybe values, catMaybes can be used to return all of the "success" results (if the list is the result of a map, then mapMaybe would be more appropriate):
    >>> import GHC.Internal.Text.Read ( readMaybe )
    
    >>> [readMaybe x :: Maybe Int | x <- ["1", "Foo", "3"] ]
    [Just 1,Nothing,Just 3]
    
    >>> catMaybes $ [readMaybe x :: Maybe Int | x <- ["1", "Foo", "3"] ]
    [1,3]
    

  10. executeRequestMaybe :: forall am (mt :: MediaType Type) a . (AuthMethod am, ParseResponse mt a) => Maybe am -> GenRequest mt 'RO a -> IO (Either Error a)

    github GitHub.Request

    Helper for picking between executeRequest and executeRequest'. The use is discouraged.

Page 270 of many | Previous | Next