:: [t] -> t package:safe

Identical to head, namely that fails on an empty list. Useful to avoid the x-partial warning introduced in GHC 9.8.
headErr [] = error "Prelude.head: empty list"
headErr [1,2,3] = 1