GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2020-07-30T12:56:39Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/18498Reading a Rational with zero denominator should fail?2020-07-30T12:56:39ZbwrogaReading a Rational with zero denominator should fail?## Summary
When reading a String as a Rational number, there seems to be no nice way prevent an error when the rational's denominator is zero.
## Steps to reproduce
`(read "1%0") :: Rational`
## Expected behavior
I would expect `readMaybe` to return `Nothing` when the denominator is zero.
## Environment
* GHC version used: 8.8.3
If this seems like a good idea, I would be happy to attempt a patch## Summary
When reading a String as a Rational number, there seems to be no nice way prevent an error when the rational's denominator is zero.
## Steps to reproduce
`(read "1%0") :: Rational`
## Expected behavior
I would expect `readMaybe` to return `Nothing` when the denominator is zero.
## Environment
* GHC version used: 8.8.3
If this seems like a good idea, I would be happy to attempt a patch