|
From: Bryan O'Sullivan <bos@...>
Subject: Instances of Read on bounded integral types should detect overflow Newsgroups: gmane.comp.lang.haskell.prime Date: 2007-09-11 18:49:10 GMT (1 year, 42 weeks, 3 days, 22 hours and 38 minutes ago) Here's a pet hobbyhorse of mine. Prelude> read "3333333333333333333333" :: Int -5527344008095509163 Other fixed-width integral types (those in Data.Int and Data.Word) behave similarly. I'd prefer to see the whole lot throw an overflow exception upon detecting a wraparound. I'll be happy to provide a sample implementation. <b |
|
|