Skip to content

pattern-matching refactoring: keep going#9447

Merged
gasche merged 5 commits intoocaml:trunkfrom
trefis:rematch-more-heads
Apr 16, 2020
Merged

pattern-matching refactoring: keep going#9447
gasche merged 5 commits intoocaml:trunkfrom
trefis:rematch-more-heads

Conversation

@gasche
Copy link
Copy Markdown
Member

@gasche gasche commented Apr 14, 2020

This is the next bit of the big pattern-matching refactoring change (#9321) after #9417 has been merged. This one is a series of small commits that iterate simple refactorings; they should be reviewed independently.

(Internal: there was a bit of rebase work due to the (nice!) change of arguments of the split_and_precompile_* function from args to ~arg suggested by @Octachron during the review of #9322.)

@gasche gasche force-pushed the rematch-more-heads branch from 9eb1e8f to 761383d Compare April 15, 2020 15:33
Copy link
Copy Markdown
Member

@Octachron Octachron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The refactoring look good overall:

  1. Restricting the return type of what_is_cases seems more natural
  2. Moving the preprocessing logic out of the split_and_precompile function seems to work
  3. Reusing compile_match_nonempty in compile_match is a clear win.
  4. The new function is quite clearer.

@gasche gasche merged commit 9f95355 into ocaml:trunk Apr 16, 2020
@gasche
Copy link
Copy Markdown
Member Author

gasche commented Apr 16, 2020

Merged, thanks! I'll try to send the next PR of the stack soon, and also work on do_for_multiple_match in parallel.

gasche added a commit to trefis/ocaml that referenced this pull request May 2, 2020
gasche added a commit to trefis/ocaml that referenced this pull request Jun 7, 2020
This comes from a suggestion by Florian Angeletti in
  ocaml#9447 (comment)
gasche added a commit to trefis/ocaml that referenced this pull request Jun 8, 2020
This comes from a suggestion by Florian Angeletti in
  ocaml#9447 (comment)
gasche added a commit to trefis/ocaml that referenced this pull request Jul 9, 2020
This comes from a suggestion by Florian Angeletti in
  ocaml#9447 (comment)
gasche added a commit to gasche/ocaml that referenced this pull request Nov 18, 2020
This comes from a suggestion by Florian Angeletti in
  ocaml#9447 (comment)
gasche added a commit to trefis/ocaml that referenced this pull request Nov 21, 2020
This comes from a suggestion by Florian Angeletti in
  ocaml#9447 (comment)
anmonteiro pushed a commit to melange-re/melange-compiler-libs that referenced this pull request Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants