Optics?
Alan & Kim Zimmerman
alan.zimm at gmail.com
Sun Oct 3 17:40:35 UTC 2021
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20211003/ca47b4c7/attachment.html>
More information about the ghc-devs
mailing list