Hoogle Search

Within LTS Haskell 24.4 (ghc-9.10.2)

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

  1. head :: HasCallStack => [a] -> a

    numeric-prelude NumericPrelude

    Extract the first element of a list, which must be non-empty. To disable the warning about partiality put {-# OPTIONS_GHC -Wno-x-partial -Wno-unrecognised-warning-flags #-} at the top of the file. To disable it throughout a package put the same options into ghc-options section of Cabal file. To disable it in GHCi put :set -Wno-x-partial -Wno-unrecognised-warning-flags into ~/.ghci config file. See also the migration guide.

    Examples
    >>> head [1, 2, 3]
    1
    
    >>> head [1..]
    1
    
    >>> head []
    *** Exception: Prelude.head: empty list
    

  2. head :: HasCallStack => [a] -> a

    numeric-prelude NumericPrelude.Base

    Extract the first element of a list, which must be non-empty. To disable the warning about partiality put {-# OPTIONS_GHC -Wno-x-partial -Wno-unrecognised-warning-flags #-} at the top of the file. To disable it throughout a package put the same options into ghc-options section of Cabal file. To disable it in GHCi put :set -Wno-x-partial -Wno-unrecognised-warning-flags into ~/.ghci config file. See also the migration guide.

    Examples
    >>> head [1, 2, 3]
    1
    
    >>> head [1..]
    1
    
    >>> head []
    *** Exception: Prelude.head: empty list
    

  3. head :: HasCallStack => [a] -> a

    numhask NumHask.Prelude

    Extract the first element of a list, which must be non-empty. To disable the warning about partiality put {-# OPTIONS_GHC -Wno-x-partial -Wno-unrecognised-warning-flags #-} at the top of the file. To disable it throughout a package put the same options into ghc-options section of Cabal file. To disable it in GHCi put :set -Wno-x-partial -Wno-unrecognised-warning-flags into ~/.ghci config file. See also the migration guide.

    Examples
    >>> head [1, 2, 3]
    1
    
    >>> head [1..]
    1
    
    >>> head []
    *** Exception: Prelude.head: empty list
    

  4. head :: ListLike full item => full -> item

    ListLike Data.ListLike

    Extracts the first element of a ListLike.

  5. head :: ListLike full item => full -> item

    ListLike Data.ListLike.Base

    Extracts the first element of a ListLike.

  6. head :: HasCallStack => [a] -> a

    basic-prelude BasicPrelude

    Extract the first element of a list, which must be non-empty. To disable the warning about partiality put {-# OPTIONS_GHC -Wno-x-partial -Wno-unrecognised-warning-flags #-} at the top of the file. To disable it throughout a package put the same options into ghc-options section of Cabal file. To disable it in GHCi put :set -Wno-x-partial -Wno-unrecognised-warning-flags into ~/.ghci config file. See also the migration guide.

    Examples
    >>> head [1, 2, 3]
    1
    
    >>> head [1..]
    1
    
    >>> head []
    *** Exception: Prelude.head: empty list
    

  7. head :: Infinite a -> a

    ghc-lib-parser GHC.Data.List.Infinite

    No documentation available.

  8. head :: ShortText -> Char

    ghc-lib-parser GHC.Data.ShortText

    O(1) Returns the first UTF-8 codepoint in the ShortText. Depending on the string in question, this may or may not be the actual first character in the string due to Unicode non-printable characters.

  9. head :: HasCallStack => [a] -> a

    ghc-lib-parser GHC.Prelude.Basic

    No documentation available.

  10. head :: Monad m => ListT m a -> m (Maybe a)

    list-t ListT

    Execute, getting the head. Returns nothing if it's empty.

Page 9 of many | Previous | Next