Closed dminuoso closed 1 year ago
I have reworked the bounded numeric parsers with two features:
a) Provide Word specific parsers (readWord, readWordHex) to allow parsing numbers twice as large.
To read smaller bounded types, a user can simply use something like intCastMaybe - but to provide broadest compatibility, we should start from Word.
Word
b) Have all bounded parsers (readWord, readWordHex, readInt, readIntHex) fail on overflow.
This feels more rigid and in line with the rest of the library. Note that from the outside an overflow is near impossible to detect reliably.
This subsumes some of the attempted work in #21
I have reworked the bounded numeric parsers with two features:
a) Provide Word specific parsers (readWord, readWordHex) to allow parsing numbers twice as large.
To read smaller bounded types, a user can simply use something like intCastMaybe - but to provide broadest compatibility, we should start from
Word
.b) Have all bounded parsers (readWord, readWordHex, readInt, readIntHex) fail on overflow.
This feels more rigid and in line with the rest of the library. Note that from the outside an overflow is near impossible to detect reliably.