write up policies for 'Prim' typeclass
- Dominant language
- Haskell
- Stars
- 123
- Forks
- 60
- PR merge metrics
- No merged PRs in 30d
Description
I think we should include a write-up about what makes sense in a `Prim` instance. Some specific points I've thought of are what makes a valid `Prim` instance (laws), what makes sense to have a `Prim` instance, why certain things are excluded, etc.
For example, I just discussed with @andrewthad about why `Bool` doesn't have a `Prim` instance. Aside from space inefficiency, let's say we map `True` to 1 and `False` to 0, then writing a byte to a `ByteArray#` means that only 1 and 0 are valid, and we cannot interpret any byte other than 0 or 1 as a `Bool`. This makes sense for anything which cannot be talked about in bytes (i.e. its size is not at least 1 byte).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.