clarify some variable names in the examples + semantic html pedantry

This commit is contained in:
Alp Mestanogullari 2015-06-18 12:32:00 +02:00
parent 74423feed0
commit 13edc014b7

View file

@ -25,11 +25,11 @@ instance ToJSON Person
-- HTML serialization of a single person -- HTML serialization of a single person
instance ToHtml Person where instance ToHtml Person where
toHtml p = toHtml person =
tr_ $ do tr_ $ do
td_ (toHtml $ firstName p) td_ (toHtml $ firstName person)
td_ (toHtml $ lastName p) td_ (toHtml $ lastName person)
td_ (toHtml . show $ age p) td_ (toHtml . show $ age person)
toHtmlRaw = toHtml toHtmlRaw = toHtml
@ -37,9 +37,9 @@ instance ToHtml Person where
instance ToHtml [Person] where instance ToHtml [Person] where
toHtml persons = table_ $ do toHtml persons = table_ $ do
tr_ $ do tr_ $ do
td_ "first name" th_ "first name"
td_ "last name" th_ "last name"
td_ "age" th_ "age"
foldMap toHtml persons foldMap toHtml persons