1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 22:31:36 +03:00

Use the obvious type variable.

This commit is contained in:
Rob Rix 2016-03-18 12:59:49 -04:00
parent 4c6be8d2bb
commit f45796ab4a

View File

@ -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.