From 20564b5a11979adf26e530fdc864baccd4013560 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Wed, 4 Oct 2017 12:42:01 -0400 Subject: [PATCH] toDeclaration is an R-algebra. --- src/Renderer/TOC.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Renderer/TOC.hs b/src/Renderer/TOC.hs index 861eb49f1..183934274 100644 --- a/src/Renderer/TOC.hs +++ b/src/Renderer/TOC.hs @@ -93,7 +93,7 @@ data Declaration class HasDeclaration f where - toDeclaration :: Blob -> f a -> Maybe Declaration + toDeclaration :: Blob -> RAlgebra f t (Maybe Declaration) instance (DeclarationStrategy f ~ strategy, HasDeclarationWithStrategy strategy f) => HasDeclaration f where toDeclaration = toDeclarationWithStrategy (undefined :: proxy strategy) @@ -102,7 +102,7 @@ instance (DeclarationStrategy f ~ strategy, HasDeclarationWithStrategy strategy data Strategy = Default | Custom class HasDeclarationWithStrategy (strategy :: Strategy) f where - toDeclarationWithStrategy :: proxy strategy -> Blob -> f a -> Maybe Declaration + toDeclarationWithStrategy :: proxy strategy -> Blob -> RAlgebra f t (Maybe Declaration) type family DeclarationStrategy f where