Hoogle Search
Within LTS Haskell 24.6 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
head :: Storable a => Vector a -> astorablevector Data.StorableVector O(1) Extract the first element of a Vector, which must be non-empty. It is a checked error to pass an empty Vector.
-
Cabal-syntax Distribution.Compat.Prelude Extract the first element of the stream.
-
ghc-boot 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.
head :: HasCallStack => OsString -> OsCharos-string System.OsString O(1) Extract the first element of a OsString, which must be non-empty. An exception will be thrown in the case of an empty OsString. This is a partial function, consider using uncons instead.
head :: HasCallStack => ShortByteString -> Word8os-string System.OsString.Data.ByteString.Short O(1) Extract the first element of a ShortByteString, which must be non-empty. An exception will be thrown in the case of an empty ShortByteString. This is a partial function, consider using uncons instead.
head :: HasCallStack => ShortByteString -> Word16os-string System.OsString.Data.ByteString.Short.Word16 O(1) Extract the first element of a ShortByteString, which must be at least one Word16. An exception will be thrown in the case of an empty ShortByteString.
head :: HasCallStack => OsString -> OsCharos-string System.OsString.Internal O(1) Extract the first element of a OsString, which must be non-empty. An exception will be thrown in the case of an empty OsString. This is a partial function, consider using uncons instead.
head :: HasCallStack => PosixString -> PosixCharos-string System.OsString.Posix O(1) Extract the first element of a OsString, which must be non-empty. An exception will be thrown in the case of an empty OsString. This is a partial function, consider using uncons instead.
head :: HasCallStack => WindowsString -> WindowsCharos-string System.OsString.Windows O(1) Extract the first element of a OsString, which must be non-empty. An exception will be thrown in the case of an empty OsString. This is a partial function, consider using uncons instead.
head :: IsNonEmpty f a a "head" => f a -> arelude Relude.List.NonEmpty O(1). Extracts the first element of a NonEmpty list. Actual type of this function is the following:
head :: NonEmpty a -> a
but it was given a more complex type to provide friendlier compile time errors.>>> head ('a' :| "bcde") 'a' >>> head [0..5 :: Int] ... ... 'head' works with 'NonEmpty', not ordinary lists. Possible fix: Replace: [Int] With: NonEmpty Int ... However, you can use 'head' with the ordinary lists. Apply 'viaNonEmpty' function from relude: viaNonEmpty head (yourList) Note, that this will return 'Maybe Int' therefore it is a safe function unlike 'head' from the standard Prelude ... >>> head (Just 'a') ... ... 'head' works with 'NonEmpty Char' lists But given: Maybe Char ...