Closed
Description
When reading a Dhall file into Haskell, often it is to a record type with fields that have limited precision, e.g. instead of Natural, the record type uses Word32 or even just Int.
In such cases, somewhere a validating conversion from Natural or Integer is needed, if not in Dhall.input itself then as a postprocessing step after that.
Double doesn't have this problem; one can read directly into Double instead of explicitly converting from Scientific to Double.
Would it make sense to add FromDhall instances for various common integral types Word8, Word16, Word32, Word64, Int8, Int16, Int32, Int64 & Int and let the range-check happen during input?