On August 3, 2025 9:17:20 PM GMT+02:00, Stefan Klinger <haskell@stefan-klinger.de> wrote:
>> Well, IIUC, it conforms to the Haskell 98 specification.
>I don't think the Haskell Spec really *requires* the `read` function
>for a bounded integral type to wrap around.

The Haskell 98 report says that reading numerical literals is defined as applying `fromInteger` in section 6.4.1 and section 6.4 says an implementation may choose to use a truncated value on overflow (or may choose anything else, it's undefined). Truncating an unbounded integer to a fixed sized would produce wrapping around.

<https://www.haskell.org/onlinereport/basic.html#sect6.4.1>

Curiously,
Pierre Thierry