Skip to content

Add the main types to be used for exactprint in the GHC AST

Alan Zimmerman requested to merge wip/az/exactprint-annotations-types-2 into master

This is a precursor to !2418 (closed), and simply brings in most of the types to be used in the final version.

This is intended to simplify the review process, as the full change is massive, and most of it is mechanically chasing through the implications of these types.

The TL;DR is that the API annotations move into the TTG extension points, except for ones corresponding to RdrNames, items appearing in lists, and one or two others, where they appear in the GenLocated instance instead, via the SrcSpanAnn type.

There are generic annotations in a lot of places, but some use an AST element specific type, but these generally appear in their respective GHC/Hs/XXX file, so are not in this commit.

It needs further tightening up from a documentation point of view, but I think getting it visible is a good first step.

This is the first step to closing #17638.

Edited by Ben Gamari

Merge request reports