-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Float parser comitting to leading 'e' #44
Comments
As a workaround, one can define their own float parser: {-| The built-in float parser has a bug with leading 'e'.
See <https://github.com/elm/parser/issues/44>
-}
parseFloat : Parser Float
parseFloat =
{- By making it backtrackable, even if the input start with an 'e',
we will be able to try out other alternatives instead of getting
stuck on it as an invalid number.
-}
Parser.backtrackable <| Parser.float ExpectingFloat InvalidNumber |
|
AlienKevin
added a commit
to AlienKevin/lambda-calculus-untyped
that referenced
this issue
May 21, 2020
AlienKevin
added a commit
to AlienKevin/lambda-calculus-untyped
that referenced
this issue
May 21, 2020
I ran in to this same problem:
Given,
it returns
instead of
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Similar to #28, the float parser comitts when it encounters an 'e', making it impossible to have a parser that reads either a float or some text:
(Try it on Ellie: https://ellie-app.com/8yp6MxtzSsna1)
The text was updated successfully, but these errors were encountered: