Hoogle Search

Within LTS Haskell 22.19 (ghc-9.6.4)

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

  1. newtype () => First a

    base-compat-batteries Data.Monoid.Compat

    Maybe monoid returning the leftmost non-Nothing value. First a is isomorphic to Alt Maybe a, but precedes it historically.

    >>> getFirst (First (Just "hello") <> First Nothing <> First (Just "world"))
    Just "hello"
    
    Beware that Data.Monoid.First is different from Data.Semigroup.First. The former returns the first non-Nothing, so Data.Monoid.First Nothing <> x = x. The latter simply returns the first value, thus Data.Semigroup.First Nothing <> x = Data.Semigroup.First Nothing.

  2. First :: Maybe a -> First a

    base-compat-batteries Data.Monoid.Compat

    No documentation available.

  3. newtype () => First a

    base-compat-batteries Data.Semigroup.Compat

    Beware that Data.Semigroup.First is different from Data.Monoid.First. The former simply returns the first value, so Data.Semigroup.First Nothing <> x = Data.Semigroup.First Nothing. The latter returns the first non-Nothing, thus Data.Monoid.First Nothing <> x = x.

  4. First :: a -> First a

    base-compat-batteries Data.Semigroup.Compat

    No documentation available.

  5. newtype () => First a

    relude Relude.Monoid

    Maybe monoid returning the leftmost non-Nothing value. First a is isomorphic to Alt Maybe a, but precedes it historically.

    >>> getFirst (First (Just "hello") <> First Nothing <> First (Just "world"))
    Just "hello"
    
    Beware that Data.Monoid.First is different from Data.Semigroup.First. The former returns the first non-Nothing, so Data.Monoid.First Nothing <> x = x. The latter simply returns the first value, thus Data.Semigroup.First Nothing <> x = Data.Semigroup.First Nothing.

  6. First :: Maybe a -> First a

    relude Relude.Monoid

    No documentation available.

  7. data First

    first-class-families Fcf.Class.Bifunctor

    Type-level first. Apply a function along the first parameter of a bifunctor.

    Example

    >>> :kind! Eval (First ((+) 1) '(3,"a"))
    Eval (First ((+) 1) '(3,"a")) :: (Natural, Symbol)
    = '(4, "a")
    

  8. type family First a :: Symbol

    generic-random Generic.Random.Internal.Generic

    No documentation available.

  9. newtype () => First a

    optparse-generic Options.Generic

    Maybe monoid returning the leftmost non-Nothing value. First a is isomorphic to Alt Maybe a, but precedes it historically.

    >>> getFirst (First (Just "hello") <> First Nothing <> First (Just "world"))
    Just "hello"
    
    Beware that Data.Monoid.First is different from Data.Semigroup.First. The former returns the first non-Nothing, so Data.Monoid.First Nothing <> x = x. The latter simply returns the first value, thus Data.Semigroup.First Nothing <> x = Data.Semigroup.First Nothing.

  10. First :: Maybe a -> First a

    optparse-generic Options.Generic

    No documentation available.

Page 2 of many | Previous | Next