From 76b21f787cb947657a71ff8562e4eb2455dc805d Mon Sep 17 00:00:00 2001 From: Alp Mestanogullari Date: Thu, 18 Jun 2015 12:32:00 +0200 Subject: [PATCH] clarify some variable names in the examples + semantic html pedantry --- servant-examples/tutorial/T4.hs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/servant-examples/tutorial/T4.hs b/servant-examples/tutorial/T4.hs index 595eabcb..94f8df73 100644 --- a/servant-examples/tutorial/T4.hs +++ b/servant-examples/tutorial/T4.hs @@ -25,11 +25,11 @@ instance ToJSON Person -- HTML serialization of a single person instance ToHtml Person where - toHtml p = + toHtml person = tr_ $ do - td_ (toHtml $ firstName p) - td_ (toHtml $ lastName p) - td_ (toHtml . show $ age p) + td_ (toHtml $ firstName person) + td_ (toHtml $ lastName person) + td_ (toHtml . show $ age person) toHtmlRaw = toHtml @@ -37,9 +37,9 @@ instance ToHtml Person where instance ToHtml [Person] where toHtml persons = table_ $ do tr_ $ do - td_ "first name" - td_ "last name" - td_ "age" + th_ "first name" + th_ "last name" + th_ "age" foldMap toHtml persons