1
1
mirror of https://github.com/github/semantic.git synced 2024-12-27 17:05:33 +03:00

Define a Section type.

This commit is contained in:
Rob Rix 2017-06-08 12:16:40 -04:00
parent e4cb8f9329
commit 50b55427f6

View File

@ -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)