Skip to content

Update withError associativity to match Control.Alt #92

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

Merged
merged 9 commits into from
Mar 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Cache PureScript dependencies
uses: actions/cache@v2
with:
key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }}
key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }}-4
path: |
.spago
output
Expand All @@ -31,7 +31,7 @@ jobs:
run: spago install

- name: Build source
run: spago build --no-install --purs-args '--censor-lib --strict --censor-codes="UserDefinedWarning"'
run: spago build --no-install

# - name: Run tests
# run: spago test --no-install
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Notable changes to this project are documented in this file. The format is based
Breaking changes:
- Update project and deps to PureScript v0.15.0 (#90 by @JordanMartinez)
- Drop deprecated `MonadZero` instance (#90 by @JordanMartinez)
- Change precedence of `withError` operator to accommodate associativity changes in `Control.Alt` (#92 by @thomashoneyman)

New features:

Expand Down
2 changes: 1 addition & 1 deletion src/StringParser/Combinators.purs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ assertConsume (Parser p) = Parser \s ->
withError :: forall a. Parser a -> String -> Parser a
withError p msg = p <|> fail msg

infixl 3 withError as <?>
infixl 4 withError as <?>

-- | Parse a string between opening and closing markers.
between :: forall a open close. Parser open -> Parser close -> Parser a -> Parser a
Expand Down