Skip to content

EPA: handling of con_bndrs in mkGadtDecl

There are two minor issues with mkGadtDecl

  1. A wibble that needs cleaning up by removing the spurious case expression
      an = case outer_bndrs of
        _                -> EpAnn (spanAsAnchor loc) (annsIn ++ annsa) (cs Semi.<> csa)
  1. When con_bndrs are HsOuterImplicit we do not print anything while exact printing.

This means the location allocated to it is meaningless, but right now it is set to the entire RHS of the GADT constructor, and this caused issues when re-allocating comments to the nearest enclosing span while exact printing.

I think in that case it should be set to noSrcSpan.

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