Skip to content

EPA: Replace Anchor with EpaLocation

Alan Zimmerman requested to merge wip/az/epa-epalocation-not-anchor into master

An Anchor has a location and an operation, which is either that it is unchanged or that it has moved with a DeltaPos

data Anchor = Anchor { anchor :: RealSrcSpan
                     , anchor_op :: AnchorOperation }

An `EpaLocation` also has either a location or a `DeltaPos`

```hs
data EpaLocation = EpaSpan !RealSrcSpan !(Strict.Maybe BufSpan)
                 | EpaDelta !DeltaPos ![LEpaComment]

Now that we do not care about always having a location in the anchor, we remove Anchor and replace it with EpaLocation

We do this with a type alias initially, to ease the transition. The alias will be removed in time.

We also have helpers to reconstruct the AnchorOperation from an EpaLocation. This is also temporary.

Updates Haddock submodule

Merge request reports