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

Specify associativity for repeated elements #233

Merged
merged 1 commit into from Sep 20, 2018

Conversation

Projects
None yet
2 participants
@Gabriel439
Contributor

Gabriel439 commented Sep 16, 2018

@Gabriel439 Gabriel439 requested a review from f-f Sep 16, 2018

@f-f

f-f approved these changes Sep 17, 2018

Gabriel439 added a commit to dhall-lang/dhall-haskell that referenced this pull request Sep 19, 2018

Make operators parse as left-associative by default
... as standardized in dhall-lang/dhall-lang#233

This also requires a matching change to how operators are pretty-printed to
match the precedence when parsing.  This changes the output for two examples
from the Prelude

@Gabriel439 Gabriel439 changed the title from Specificy associativity for repeated elements to Specify associativity for repeated elements Sep 19, 2018

Gabriel439 pushed a commit to dhall-lang/Prelude that referenced this pull request Sep 20, 2018

Gabriel Gonzalez
Parenthesize right-associative output
This is related to dhall-lang/dhall-lang#233

Specifically, `List/fold` and `Natural/fold` produce right-associated operators,
so the output must now be explicitly parenthesized since the default
associativity is specified to be left-associativity

@Gabriel439 Gabriel439 merged commit 9b54fa7 into master Sep 20, 2018

1 check passed

hydra Hydra build #3243 of dhall-lang:233:dhall-lang
Details

@Gabriel439 Gabriel439 deleted the gabriel/left_associativity branch Sep 20, 2018

Gabriel439 added a commit to dhall-lang/Prelude that referenced this pull request Sep 20, 2018

Parenthesize right-associative output (#11)
This is related to dhall-lang/dhall-lang#233

Specifically, `List/fold` and `Natural/fold` produce right-associated operators,
so the output must now be explicitly parenthesized since the default
associativity is specified to be left-associativity

Gabriel439 added a commit to dhall-lang/dhall-haskell that referenced this pull request Sep 20, 2018

Make operators parse as left-associative by default (#593)
... as standardized in dhall-lang/dhall-lang#233

This also requires a matching change to how operators are pretty-printed to
match the precedence when parsing.  This changes the output for two examples
from the Prelude
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment