Open
Description
Hi, I'm opening this issue regarding the documentation of the following functions:
Nowhere in the module documentation or in those functions it is said clearly the fact that:
- Given an empty vector,
head
will raise a runtime error; unsafe
functions do not lead to RTS exceptions (like they may do in other container-like APIs), but will segfault the program. Beginners and more generally people who did not experience this behaviour first-hand are in no way warned of the implications of usingunsafe
functions (who are then closer than Rust’sunsafe
than the commonly accepted definition of safety in the Haskell ecosystem).
I personally think it is dangerous to leave such gaps in the documentation and wanted to discuss this with the maintainers before opening a PR to rectify this.
cc @cartazio