Use fixed-width integers to represent days
- Dominant language
- Haskell
- Stars
- 135
- Forks
- 83
- PR merge metrics
- No merged PRs in 30d
Description
Currently https://hackage.haskell.org/package/time-1.8.0.1/docs/Data-Time-Calendar.html#t:Day is represented in memory as an `Integer`, and many similar functions like `fromGregorian` which interface with `Integer`s. While this is admirably future-proof (we can deal with years larger than the year 2,147,481,790 AD!) I think we will be using intuitionistic type theory sooner than we will need those dates :)
Using something like `Int32` would give us nearly the same flexibility, better `Storable` instances, interfacing with C and serialization/deserialization. I'm not sure how much this will break downstream code, but I have a feeling most people are using `fromIntegral` to interface with the API anyways, and this change will actually lessen the amount of marshalling people need to do.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.