diff --git a/src/Language/Ruby/Syntax.hs b/src/Language/Ruby/Syntax.hs index 4b05257e9..2e374d4a7 100644 --- a/src/Language/Ruby/Syntax.hs +++ b/src/Language/Ruby/Syntax.hs @@ -115,6 +115,8 @@ type FAlgebra t a = Base t a -> a -- | An R-algebra on the base functor of some type 't'. type RAlgebra t a = Base t (t, a) -> a +fToR :: Functor (Base t) => FAlgebra t a -> RAlgebra t a +fToR f = f . fmap snd -- | Produce a list of identifiable subterms of a given term. --