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.
head :: HasCallStack => [a] -> abase 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.head :: HasCallStack => [a] -> abase 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.head :: Foldable1 t => t a -> abase Data.Foldable1 The first element of a non-empty structure.
>>> head (1 :| [2, 3, 4]) 1
-
base Data.List.NonEmpty Extract the first element of the stream.
head :: HasCallStack => [a] -> abase 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.head :: HasCallStack => [a] -> abase 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.head :: HasCallStack => ByteString -> Word8bytestring 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.
-
bytestring Data.ByteString.Char8 O(1) Extract the first element of a ByteString, which must be non-empty.
head :: HasCallStack => ByteString -> Word8bytestring 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.
-
bytestring Data.ByteString.Lazy.Char8 O(1) Extract the first element of a ByteString, which must be non-empty.
Page 1 of many | Next