Skip to content

Reimplement operator apps, operator splits, and "placeholder shorthand" lambdas #302

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 30 commits into from
May 25, 2025

Conversation

LPTK
Copy link
Contributor

@LPTK LPTK commented Apr 25, 2025

@chengluyu This is the WIP of my changes. Can you please look into updating the UCS and pattern compilation implementations?

@LPTK LPTK changed the base branch from mlscript to hkmc2 April 25, 2025 14:43
LPTK and others added 20 commits April 26, 2025 15:23
# Conflicts:
#	hkmc2/shared/src/main/scala/hkmc2/syntax/Parser.scala
#	hkmc2/shared/src/test/mlscript/HkScratch.mls
#	hkmc2/shared/src/test/mlscript/backlog/MultilineExpressions.mls
#	hkmc2/shared/src/test/mlscript/backlog/UCS.mls
#	hkmc2/shared/src/test/mlscript/handlers/Debugging.mls
#	hkmc2/shared/src/test/mlscript/nofib/clausify.mls
#	hkmc2/shared/src/test/mlscript/nofib/last-piece.mls
#	hkmc2/shared/src/test/mlscript/nofib/mate.mls
#	hkmc2/shared/src/test/mlscript/nofib/minimax.mls
#	hkmc2/shared/src/test/mlscript/nofib/pretty.mls
#	hkmc2/shared/src/test/mlscript/nofib/treejoin.mls
#	hkmc2/shared/src/test/mlscript/ucs/examples/BinarySearchTree.mls
#	hkmc2/shared/src/test/mlscript/ucs/papers/OperatorSplit.mls
# Conflicts:
#	hkmc2/shared/src/main/scala/hkmc2/semantics/Elaborator.scala
#	hkmc2/shared/src/main/scala/hkmc2/syntax/Parser.scala
#	hkmc2/shared/src/main/scala/hkmc2/syntax/Tree.scala
#	hkmc2/shared/src/test/mlscript-compile/Iter.mjs
#	hkmc2/shared/src/test/mlscript-compile/Predef.mjs
#	hkmc2/shared/src/test/mlscript/backlog/ToTriage.mls
#	hkmc2/shared/src/test/mlscript/basics/AppOp.mls
#	hkmc2/shared/src/test/mlscript/basics/MiscArrayTests.mls
#	hkmc2/shared/src/test/mlscript/codegen/FunnyOpen.mls
#	hkmc2/shared/src/test/mlscript/codegen/Juxtapositions.mls
#	hkmc2/shared/src/test/mlscript/codegen/OptMatch.mls
#	hkmc2/shared/src/test/mlscript/llir/Classes.mls
#	hkmc2/shared/src/test/mlscript/llir/ControlFlow.mls
#	hkmc2/shared/src/test/mlscript/llir/HigherOrder.mls
#	hkmc2/shared/src/test/mlscript/llir/Lazy.mls
#	hkmc2/shared/src/test/mlscript/llir/LazyCycle.mls
#	hkmc2/shared/src/test/mlscript/llir/Method.mls
#	hkmc2/shared/src/test/mlscript/llir/Tuple.mls
#	hkmc2/shared/src/test/mlscript/std/PredefTest.mls
LPTK added 5 commits May 12, 2025 18:29
# Conflicts:
#	hkmc2/shared/src/main/scala/hkmc2/syntax/Keyword.scala
#	hkmc2/shared/src/main/scala/hkmc2/syntax/Parser.scala
#	hkmc2/shared/src/test/mlscript/backlog/ToTriage.mls
#	hkmc2/shared/src/test/mlscript/backlog/UCS.mls
#	hkmc2/shared/src/test/mlscript/basics/Puns.mls
#	hkmc2/shared/src/test/mlscript/codegen/PartialApps.mls
@LPTK LPTK marked this pull request as ready for review May 23, 2025 14:24
@LPTK LPTK requested a review from chengluyu May 23, 2025 14:24
@LPTK
Copy link
Contributor Author

LPTK commented May 23, 2025

@chengluyu I think I'm done with my changes. Could you please review them and also review your own changes?

Copy link
Member

@chengluyu chengluyu left a comment

Choose a reason for hiding this comment

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

Nice PR! I’ve left a few minor suggestions and questions.

I’m glad to see that the syntax for operator and newline has been determined. Also, the parser can now handle operator splits in a better way.

This PR has also eliminated many parse errors, making the parser more robust. I think like I can now update the parser used by the VSCode extension.

(Let's merge this PR so that I can resolve the conflicts in my PR. 😁)

@LPTK LPTK requested a review from chengluyu May 25, 2025 08:37
Copy link
Member

@chengluyu chengluyu left a comment

Choose a reason for hiding this comment

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

LGTM!

@LPTK LPTK merged commit 55e4008 into hkust-taco:hkmc2 May 25, 2025
1 check passed
@LPTK LPTK deleted the hkmc2-op-splits branch May 25, 2025 12:25
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