
3 Oct
2021
3 Oct
'21
1:40 p.m.
Hi all I am working on a variant of the exact printer which updates the annotation locations from the `EpaSpan` version to the `EpaDelta` version, as the printing happens data EpaLocation = EpaSpan RealSrcSpan | EpaDelta DeltaPos The function doing the work is this markAnnKw :: (Monad m, Monoid w) => EpAnn a -> (a -> EpaLocation) -> (a -> EpaLocation -> a) -> AnnKeywordId -> EP w m (EpAnn a) which gets an annotation, a function to pull a specific location out, and one to update it. I do not know much about lenses, but have a feeling that I could simplify things by using one. Can anyone give me any pointers? Alan