| License | MIT |
|---|---|
| Safe Haskell | None |
| Language | GHC2021 |
Language.Egison.Desugar
Description
This module implements Phase 3-4: Syntactic Desugaring (for untyped path). For the typed path, desugaring is done inside type inference.
Syntactic Desugaring (Phase 3-4): - Operator desugaring (infix to function application) - Anonymous function expansion (cambda: 1#($1 + $2) etc.) - Match-lambda expansion (convert to match expressions) - Other syntactic sugar expansions
Design Note (design/implementation.md): Pattern matching itself is NOT desugared here. Match expressions (IMatchExpr, IMatchAllExpr) are kept as-is and processed during evaluation (Phase 10). This allows Egison's sophisticated pattern matching to be implemented in the evaluator.