We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Given the following function:
bug :: Number -> Number -> Number bug a b = 0 - (a - b)
The compiler strips away the parentheses, yielding JS code like this:
return 0 - a - b;
I was expecting this:
return 0 - (a - b);
The former returns an unexpected result:
bug 0 (-2) -- returns 2 ((0 - 0) - -2), not -2 (0 - (0 - -2)) as one would expect
The text was updated successfully, but these errors were encountered:
db4fd45
Merge pull request #574 from purescript/569
6409289
Fix #569
No branches or pull requests
Given the following function:
The compiler strips away the parentheses, yielding JS code like this:
I was expecting this:
The former returns an unexpected result:
The text was updated successfully, but these errors were encountered: