Skip to content

TTG: move phase-specific constructors

The goal of this ticket is to move phase-specific constructors to extension fields (Trees That Grow) - make illegal states unrepresentable.

  • (!2083 (closed)) HsWrap is specific to typechecking, should be inside XExpr.
  • (!2553 (closed)) ConPatIn and ConPatOut could become a single ConPat with fields depending on the pass.
  • (!2553 (closed)) Perhaps CoPat too.
  • (!5595 (merged)) HsRnBracketOut occurs only at the GhcRn phase.
  • (!5595 (merged)) HsTcBracketOut occurs only at the GhcTc phase.
  • (!7614 (closed)) AbsBinds occurs only at the GhcTc phase.
  • (!6605 (closed)) HsTick and HsBinTick occur only at the GhcTc phase.
  • (!5640 (closed)) HsConLikeOut occurs only at the GhcTc phase.
  • (!5595 (merged)) Perhaps HsUnboundVar, HsIPVar, HsOverLabel which occur in GhcPs and GhcRn but not GhcTc.

(Initial idea mentioned by Simon and Richard during Zurihac)

Edited by John Ericson
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information