Enhancement of quote pattern matching in Scala 3
- Mentors
- Anatolii Kmetiuk, Nicolas Stucki
- Organization
- Scala Center
- Technologies
- Scala 3
- Topics
- programming languages, type system, compiler, Macros, metaprogramming, pattern matching
Macro is a metaprogramming feature that allows programmers to analyze and synthesize code at compile-time. Scala 3 supports a powerful yet type-safe macro system that allows analysis of the structure of code fragments via quote pattern matching.
In this project, we aim for two goals:
1. The current implementation of quote pattern matching does not have many tests and is expected to be unstable. I propose making the feature more reliable by creating a checklist that captures which language features should be supported and adding more automated tests based on the checklist.
2. The current quote pattern matching does not support extraction of polymorphic functions. I propose extending HOAS patterns to support pattern matching against polymorphic functions based on formal
definitions.