Skip to content
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

Fix operator precedence / lots of irritating silly parentheses (LISP) #84

Open
joshsh opened this issue May 22, 2023 · 0 comments
Open

Comments

@joshsh
Copy link
Collaborator

joshsh commented May 22, 2023

Both in Haskell and Java code generation, Hydra is currently over-cautious about parenthesization, leading to expressions like:

primitiveArity x = (typeArity (Graph.primitiveType x))

and

hydra.extras.Extras.typeArity(((instance.value)).codomain));

The generated code is correct, but it looks dumb when these extra parens are included. The reasons have to do with operator precedence as well as some additional quirks of Java codegen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant