From 50b55427f646db8f0afe83d84ab88a3a51a55b43 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 8 Jun 2017 12:16:40 -0400 Subject: [PATCH] Define a Section type. --- src/Data/Syntax/Markup.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Data/Syntax/Markup.hs b/src/Data/Syntax/Markup.hs index b0b2636d6..80fad22e3 100644 --- a/src/Data/Syntax/Markup.hs +++ b/src/Data/Syntax/Markup.hs @@ -23,6 +23,12 @@ newtype Paragraph a = Paragraph [a] instance Eq1 Paragraph where liftEq = genericLiftEq instance Show1 Paragraph where liftShowsPrec = genericLiftShowsPrec +data Section a = Section { sectionHeading :: a, sectionContent :: [a] } + deriving (Eq, Foldable, Functor, GAlign, Generic1, Show, Traversable) + +instance Eq1 Section where liftEq = genericLiftEq +instance Show1 Section where liftShowsPrec = genericLiftShowsPrec + data Heading a = Heading { headingLevel :: Int, headingContent :: [a] } deriving (Eq, Foldable, Functor, GAlign, Generic1, Show, Traversable)