The read function is useful for converting String to Int, but it does not support error handling. Especially, it silently returns an incorrect value when the string value is too large to be represented as Int:
> read "123456789012345678901234567890" :: Int
-4362896299872285998
How can I check if the string value is between minBound :: Int and maxBound :: Int and thus correctly converted to Int? Is there an overflow-detecting conversion function that returns Maybe Int or something?