Hoogle Search

Within LTS Haskell 22.22 (ghc-9.6.5)

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

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

    base Prelude

    Extract the first element of a list, which must be non-empty.

    >>> head [1, 2, 3]
    1
    
    >>> head [1..]
    1
    
    >>> head []
    *** Exception: Prelude.head: empty list
    
    WARNING: This function is partial. You can use case-matching, uncons or listToMaybe instead.

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

    base Data.List

    Extract the first element of a list, which must be non-empty.

    >>> head [1, 2, 3]
    1
    
    >>> head [1..]
    1
    
    >>> head []
    *** Exception: Prelude.head: empty list
    
    WARNING: This function is partial. You can use case-matching, uncons or listToMaybe instead.

  3. head :: Foldable1 t => t a -> a

    base Data.Foldable1

    The first element of a non-empty structure.

    >>> head (1 :| [2, 3, 4])
    1
    

  4. head :: NonEmpty a -> a

    base Data.List.NonEmpty

    Extract the first element of the stream.

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

    base GHC.List

    Extract the first element of a list, which must be non-empty.

    >>> head [1, 2, 3]
    1
    
    >>> head [1..]
    1
    
    >>> head []
    *** Exception: Prelude.head: empty list
    
    WARNING: This function is partial. You can use case-matching, uncons or listToMaybe instead.

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

    base GHC.OldList

    Extract the first element of a list, which must be non-empty.

    >>> head [1, 2, 3]
    1
    
    >>> head [1..]
    1
    
    >>> head []
    *** Exception: Prelude.head: empty list
    
    WARNING: This function is partial. You can use case-matching, uncons or listToMaybe instead.

  7. head :: HasCallStack => ByteString -> Word8

    bytestring Data.ByteString

    O(1) Extract the first element of a ByteString, which must be non-empty. An exception will be thrown in the case of an empty ByteString. This is a partial function, consider using uncons instead.

  8. head :: ByteString -> Char

    bytestring Data.ByteString.Char8

    O(1) Extract the first element of a ByteString, which must be non-empty.

  9. head :: HasCallStack => ByteString -> Word8

    bytestring Data.ByteString.Lazy

    O(1) Extract the first element of a ByteString, which must be non-empty. This is a partial function, consider using uncons instead.

  10. head :: ByteString -> Char

    bytestring Data.ByteString.Lazy.Char8

    O(1) Extract the first element of a ByteString, which must be non-empty.

Page 1 of many | Next