The desugaring pipeline proceeds as follows:
- Introduce type synonyms for type class dictionaries
- Rebracket user-defined binary operators
- Desugar do-notation using the
- Desugar top-level case declarations into explicit case expressions
- Desugar type declarations into value declarations with explicit type annotations
- Group mutually recursive value and data declarations into binding groups.
- Qualify any unqualified names and types