From f45796ab4a8170648074d636ab02ee742d7acbba Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 18 Mar 2016 12:59:49 -0400 Subject: [PATCH] Use the obvious type variable. --- src/Term.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Term.hs b/src/Term.hs index d76c382b9..0abbff04c 100644 --- a/src/Term.hs +++ b/src/Term.hs @@ -24,7 +24,7 @@ zipTerms (annotation1 :< a) (annotation2 :< b) = annotate $ zipUnwrap a b zipUnwrapMaps a' b' key = (,) key <$> zipTerms (a' ! key) (b' ! key) -- | Fold a term into some other value, starting with the leaves. -cata :: Functor f => (annotation -> f b -> b) -> Cofree f annotation -> b +cata :: Functor f => (annotation -> f a -> a) -> Cofree f annotation -> a cata f = uncurry f . second (fmap (cata f)) . unCofree -- | Unfold a term and its annotation starting from a seed value.