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
Pretty-printing BH code that has infix operators at different precedences is bugged.
Example input:
package Foo where foo :: Integer foo = 1 + 2 * 3 + 4 bar :: Integer bar = 1 + (2 * 3) + 4 baz :: Integer baz = (1 + 2) * 3 + 4 qux :: Integer qux = 1 + 2 * (3 + 4)
Compiling with -dparsed yields:
-dparsed
package Foo where { foo :: Integer; foo = 1 + 2 * 3 + 4;; bar :: Integer; bar = 1 + 2 * 3 + 4;; baz :: Integer; baz = 1 + 2 * 3 + 4;; qux :: Integer; qux = 1 + 2 * 3 + 4; }
which loses all the precedence information from the parens, so if it's fed back to bsc it produces different semantics.
bsc
This is related to #568 (although that is a separate CSyntax cons); they should probably be fixed together.
The text was updated successfully, but these errors were encountered:
The same issue also affects BSV. Given this code:
package Foo; Integer foo; foo = 1 + 2 * 3 + 4; Integer bar; bar = 1 + (2 * 3) + 4; Integer baz; baz = (1 + 2) * 3 + 4; Integer qux; qux = 1 + 2 * (3 + 4); endpackage
Compiling this with -dparsed yields:
package Foo; Integer foo; foo = 1 + 2 * 3 + 4; Integer bar; bar = 1 + 2 * 3 + 4; Integer baz; baz = 1 + 2 * 3 + 4; Integer qux; qux = 1 + 2 * 3 + 4; endpackage: Foo
Sorry, something went wrong.
No branches or pull requests
Pretty-printing BH code that has infix operators at different precedences is bugged.
Example input:
Compiling with
-dparsed
yields:which loses all the precedence information from the parens, so if it's fed back to
bsc
it produces different semantics.This is related to #568 (although that is a separate CSyntax cons); they should probably be fixed together.
The text was updated successfully, but these errors were encountered: