Hoogle Search

Within LTS Haskell 24.5 (ghc-9.10.2)

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

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

    Cabal-syntax Distribution.Compat.Prelude

    No documentation available.

  2. maybeToLibraryName :: Maybe UnqualComponentName -> LibraryName

    Cabal-syntax Distribution.Types.LibraryName

    Convert the UnqualComponentName of a library into a LibraryName.

  3. maybePlus :: (a -> Maybe a) -> a -> [a]

    hxt Data.Tree.NavigatableTree.XPathAxis

    collect all trees by moving into one direction, starting tree is not included

  4. maybeStar :: (a -> Maybe a) -> a -> [a]

    hxt Data.Tree.NavigatableTree.XPathAxis

    collect all trees by moving into one direction, starting tree is included

  5. maybeCons0 :: Maybe b -> [[b]]

    leancheck Test.LeanCheck.Tiers

    Like cons0 but lifted over a Maybe value. Only a Just value will be returned.

  6. maybeCons1 :: Listable a => (a -> Maybe b) -> [[b]]

    leancheck Test.LeanCheck.Tiers

    Like cons1 but lifted over a Maybe result. This discard Nothing values. Only Just values are returned.

  7. maybeCons2 :: (Listable a, Listable b) => (a -> b -> Maybe c) -> [[c]]

    leancheck Test.LeanCheck.Tiers

    Like cons2 but lifted over a Maybe result. This discard Nothing values. Only Just values are returned. Useful when declaring generators which have pre-conditions:

    data Fraction  =  Fraction Int Int
    
    mkFraction _ 0  =  Nothing
    mkFraction n d  =  Fraction n d
    
    instance Listable Fraction where
    tiers  =  maybeCons2 mkFraction
    

  8. maybeAt :: Int -> [a] -> Maybe a

    relude Relude.List

    !!? with its arguments flipped. Get element from list using index value starting from `0`.

    >>> maybeAt 0 []
    Nothing
    
    >>> maybeAt 3 ["a", "b", "c"]
    Nothing
    
    >>> maybeAt (-1) [1, 2, 3]
    Nothing
    
    >>> maybeAt 2 ["a", "b", "c"]
    Just "c"
    

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

    relude Relude.Monad.Either

    Maps Maybe to Either wrapping default value into Right.

    >>> maybeToLeft True (Just "aba")
    Left "aba"
    
    >>> maybeToLeft True Nothing
    Right True
    

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

    relude Relude.Monad.Either

    Maps Maybe to Either wrapping default value into Left.

    >>> maybeToRight True (Just "aba")
    Right "aba"
    
    >>> maybeToRight True Nothing
    Left True
    

Page 39 of many | Previous | Next