There have been several requests over the past year for better support for inspecting the types of hsSyn terms (#17331, #15320, #16804). This patch introduces a new TTG pass,
With, which decorates all
HsExpr nodes with a given type and the following functions:
hsExprType :: HsExpr GhcTc -> HsExpr (With Type GhcTc) project :: HsExpr (With a p) -> a
This interface should be flexible enough to allow all of the above tickets to be efficiently addressed.
Withis a bit vague; it should mention the fact that it is decorating only
There are a few
undefinedsprinkled about that need to be filled in