on master help sign in
clarify some variable names in the examples + semantic html pedantry
commit76b21f787cb947657a71ff8562e4eb2455dc805d authorAlp Mestanogullari <alpmestan@gmail.com> dateThu 18 Jun 2015, 12:32 (11 years ago) parentd1ee5c7
1 file changed+7−7
servant-examples/tutorial/T4.hs+7−7
servant-examples/tutorial/T4.hs+7−7
@@ -25,11 +25,11 @@ instance ToJSON Person
2525
2626-- HTML serialization of a single person
2727instance ToHtml Person where
28− toHtml p =
28+ toHtml person =
2929 tr_ $ do
30− td_ (toHtml $ firstName p)
31− td_ (toHtml $ lastName p)
32− td_ (toHtml . show $ age p)
30+ td_ (toHtml $ firstName person)
31+ td_ (toHtml $ lastName person)
32+ td_ (toHtml . show $ age person)
3333
3434 toHtmlRaw = toHtml
3535
@@ -37,9 +37,9 @@ instance ToHtml Person where
3737instance ToHtml [Person] where
3838 toHtml persons = table_ $ do
3939 tr_ $ do
40− td_ "first name"
41− td_ "last name"
42− td_ "age"
40+ th_ "first name"
41+ th_ "last name"
42+ th_ "age"
4343
4444 foldMap toHtml persons
4545