parsec
parsec copied to clipboard
Text.Parsec.Language.haskell incorrectly parses floating literal as Double
According to the Haskell 2010 Language Report floating literal should be parsed as Rational
. However Text.Parsec.Language.haskell
parses them as Double
.
To fix this we would need to change the types of TokenParser.float
and TokenParser.naturalOrFloat
from Double
to Rational
. This is a breaking change that will also affect other language definitions. Is that an option?
hrm... what about generalising to Fractional r =>
?