Skip to content

Commit

Permalink
Merge pull request #21 from lukewilliamboswell/syntax-updates
Browse files Browse the repository at this point in the history
Remove backpassing
  • Loading branch information
lukewilliamboswell authored Aug 25, 2024
2 parents 218d7ae + 21eab6b commit 00a1df9
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/csv-movies.roc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
app [main] {
cli: platform "https://github.com/roc-lang/basic-cli/releases/download/0.10.0/vNe6s9hWzoTZtFmNkvEICPErI9ptji_ySjicO6CkucY.tar.br",
cli: platform "https://github.com/roc-lang/basic-cli/releases/download/0.14.0/dC5ceT962N_4jmoyoffVdphJ_4GlW3YMhAPyGPr-nU0.tar.br",
parser: "../package/main.roc",
}

Expand Down
2 changes: 1 addition & 1 deletion examples/letters.roc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
app [main] {
cli: platform "https://github.com/roc-lang/basic-cli/releases/download/0.10.0/vNe6s9hWzoTZtFmNkvEICPErI9ptji_ySjicO6CkucY.tar.br",
cli: platform "https://github.com/roc-lang/basic-cli/releases/download/0.14.0/dC5ceT962N_4jmoyoffVdphJ_4GlW3YMhAPyGPr-nU0.tar.br",
parser: "../package/main.roc",
}

Expand Down
2 changes: 1 addition & 1 deletion examples/markdown.roc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
app [main] {
cli: platform "https://github.com/roc-lang/basic-cli/releases/download/0.10.0/vNe6s9hWzoTZtFmNkvEICPErI9ptji_ySjicO6CkucY.tar.br",
cli: platform "https://github.com/roc-lang/basic-cli/releases/download/0.14.0/dC5ceT962N_4jmoyoffVdphJ_4GlW3YMhAPyGPr-nU0.tar.br",
parser: "../package/main.roc",
}

Expand Down
2 changes: 1 addition & 1 deletion examples/numbers.roc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
app [main] {
cli: platform "https://github.com/roc-lang/basic-cli/releases/download/0.10.0/vNe6s9hWzoTZtFmNkvEICPErI9ptji_ySjicO6CkucY.tar.br",
cli: platform "https://github.com/roc-lang/basic-cli/releases/download/0.14.0/dC5ceT962N_4jmoyoffVdphJ_4GlW3YMhAPyGPr-nU0.tar.br",
parser: "../package/main.roc",
}

Expand Down
2 changes: 1 addition & 1 deletion examples/xml-svg.roc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
app [main] {
cli: platform "https://github.com/roc-lang/basic-cli/releases/download/0.10.0/vNe6s9hWzoTZtFmNkvEICPErI9ptji_ySjicO6CkucY.tar.br",
cli: platform "https://github.com/roc-lang/basic-cli/releases/download/0.14.0/dC5ceT962N_4jmoyoffVdphJ_4GlW3YMhAPyGPr-nU0.tar.br",
html: "https://github.com/Hasnep/roc-html/releases/download/v0.6.0/IOyNfA4U_bCVBihrs95US9Tf5PGAWh3qvrBN4DRbK5c.tar.br",
parser: "../package/main.roc",
}
Expand Down
4 changes: 2 additions & 2 deletions package/Core.roc
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ alt = \first, second ->
apply : Parser input (a -> b), Parser input a -> Parser input b
apply = \funParser, valParser ->
combined = \input ->
{ val: funVal, input: rest } <- Result.try (parsePartial funParser input)
{ val: funVal, input: rest } = parsePartial? funParser input
parsePartial valParser rest
|> Result.map \{ val: val, input: rest2 } ->
{ val: funVal val, input: rest2 }
Expand All @@ -213,7 +213,7 @@ apply = \funParser, valParser ->
andThen : Parser input a, (a -> Parser input b) -> Parser input b
andThen = \firstParser, buildNextParser ->
fun = \input ->
{ val: firstVal, input: rest } <- Result.try (parsePartial firstParser input)
{ val: firstVal, input: rest } = parsePartial? firstParser input
nextParser = buildNextParser firstVal

parsePartial nextParser rest
Expand Down

0 comments on commit 00a1df9

Please sign in to comment.