Using purescript-nonempty, the signature of group could be changed from
group :: forall a. Eq a => List a -> List (List a)
to
group :: forall a. Eq a => List a -> List (NonEmpty List a)
I believe this is not just more descriptive, but also useful because it helps people to avoid unsafePartial <<< Data.List.Partial.head or similar constructions.
On the downside, it pulls in the purescript-nonempty dependency.
The same applies to group' and groupBy.