1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 08:25:19 +03:00

Rename the f type parameter to syntax.

This commit is contained in:
Rob Rix 2017-11-24 14:02:06 -05:00
parent 610a420023
commit b9bca6f567

View File

@ -65,10 +65,10 @@ openFToOpenR :: OpenFAlgebra t a -> OpenRAlgebra t a
openFToOpenR alg = alg . fmap snd
-- | Lift an algebra into a decorator for terms annotated with records.
decoratorWithAlgebra :: Functor f
=> RAlgebra (Term f (Record fs)) a -- ^ An R-algebra on terms.
-> Term f (Record fs) -- ^ A term to decorate with values produced by the R-algebra.
-> Term f (Record (a ': fs)) -- ^ A term decorated with values produced by the R-algebra.
decoratorWithAlgebra :: Functor syntax
=> RAlgebra (Term syntax (Record fs)) a -- ^ An R-algebra on terms.
-> Term syntax (Record fs) -- ^ A term to decorate with values produced by the R-algebra.
-> Term syntax (Record (a ': fs)) -- ^ A term decorated with values produced by the R-algebra.
decoratorWithAlgebra alg = para $ \ c@(In a f) -> termIn (alg (fmap (second (rhead . termAnnotation)) c) :. a) (fmap snd f)