ssm-lang / sslang

A language built atop the Sparse Synchronous Model
BSD 3-Clause "New" or "Revised" License
18 stars 0 forks source link

Desugar pattern matching in IR #129

Closed yiming-fang closed 1 year ago

yiming-fang commented 1 year ago

This PR will migrate the previous work done by @LeoQiao18 on desugaring pattern matching from AST to IR.

The rationale behind this migration is to ensure that the desugaring pass only happens after type-checking. Type correctness is assumed by most desugaring algorithms, and doing desugaring in the AST can lead to potential hazards, such as accidentally transforming ill-typed expressions to well-typed expressions or vice versa.