Clarify the drawbacks of unsafe functions
- Dominant language
- Haskell
- Stars
- 400
- Forks
- 145
- PR merge metrics
- No merged PRs in 30d
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 using `unsafe` functions (who are then closer than Rust’s `unsafe` 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
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.