From c166973676f5fa2221abffbd5e719f8eddb89d65 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 9 May 2017 13:33:17 -0400 Subject: [PATCH] Simplify mapAnnotations. --- src/Diff.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Diff.hs b/src/Diff.hs index a45b26b47..1c137c1ef 100644 --- a/src/Diff.hs +++ b/src/Diff.hs @@ -44,7 +44,7 @@ mapAnnotations :: (Functor f, Functor g) => (annotation -> annotation') -> Free (TermF f (g annotation)) (Patch (Term f annotation)) -> Free (TermF f (g annotation')) (Patch (Term f annotation')) -mapAnnotations f = iter (wrap . first (fmap f)) . fmap (pure . fmap (fmap f)) +mapAnnotations f = hoistFree (first (fmap f)) . fmap (fmap (fmap f)) -- | Fold a diff with a combining rule for replacement patches and an algebra on the annotated syntax functor.