Skip to content

Fix compiled constructor patterns (close #521)#537

Merged
LPTK merged 6 commits into
hkust-taco:hkmc2from
chengluyu:issue-521-data-constructor-patterns
Jun 30, 2026
Merged

Fix compiled constructor patterns (close #521)#537
LPTK merged 6 commits into
hkust-taco:hkmc2from
chengluyu:issue-521-data-constructor-patterns

Conversation

@chengluyu

@chengluyu chengluyu commented Jun 30, 2026

Copy link
Copy Markdown
Member

This PR unifies the way how the UCS compiles constructor patterns and how the pattern compiler compiles constructor patterns, which was documented in #521.

It also gets rid of unnecessary record construction in match-only mode.

chengluyu and others added 3 commits June 29, 2026 17:53
# Conflicts:
#	hkmc2/shared/src/main/scala/hkmc2/semantics/ups/Compiler.scala
#	hkmc2/shared/src/test/mlscript/ucs/patterns/CompiledClassPatterns.mls

@LPTK LPTK left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Otherwise LGTM, thx!

Comment thread hkmc2/shared/src/main/scala/hkmc2/semantics/ups/Compiler.scala
Comment thread hkmc2/shared/src/main/scala/hkmc2/semantics/ups/Compiler.scala Outdated
Comment thread hkmc2/shared/src/test/mlscript/ucs/patterns/CompiledClassPatterns.mls Outdated
Comment thread hkmc2/shared/src/test/mlscript/ups/fixpoint/SimpleExample.mls
Comment thread hkmc2/shared/src/test/mlscript/ups/recursion/NatBox.mls Outdated
Comment thread hkmc2/shared/src/test/mlscript/ups/recursion/NatBox.mls Outdated
chengluyu and others added 3 commits June 30, 2026 12:18
Co-authored-by: Lionel Parreaux <lionel.parreaux@gmail.com>
Co-authored-by: Lionel Parreaux <lionel.parreaux@gmail.com>
@LPTK LPTK merged commit b6d3c6f into hkust-taco:hkmc2 Jun 30, 2026
1 check passed
@LPTK LPTK deleted the issue-521-data-constructor-patterns branch June 30, 2026 13:44
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