From d429d77b15314146ddfb2163c0f454e335017758 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 24 Apr 2017 15:43:22 -0400 Subject: [PATCH] Define a type synonym for R-algebras. --- src/Language/Ruby/Syntax.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Language/Ruby/Syntax.hs b/src/Language/Ruby/Syntax.hs index aaff50620..75fd48028 100644 --- a/src/Language/Ruby/Syntax.hs +++ b/src/Language/Ruby/Syntax.hs @@ -112,6 +112,9 @@ optional a = a <|> term <*> pure Syntax.Empty -- | An F-algebra on some carrier functor 'f'. type FAlgebra f a = f a -> a +-- | An R-algebra on the base functor of some type 't'. +type RAlgebra t a = Base t (t, a) -> a + -- | Produce a list of identifiable subterms of a given term. --