haskell / haskell/parsec

Text.Parsec.Language.haskell incorrectly parses floating literal as Double

Open
#89 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Haskell
Stars
892
Forks
99
PR merge metrics
No merged PRs in 30d

Description

According to the Haskell 2010 Language Report [floating literal should be parsed as `Rational`](https://www.haskell.org/onlinereport/haskell2010/haskellch6.html#x13-1360006.4.1). 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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.