* sequence_ $ map to mapM_
This commit is contained in:
parent
2738271e67
commit
a57faddd25
1 changed files with 4 additions and 4 deletions
|
@ -78,8 +78,8 @@ renderEntries showAll entries topText footerLinks = do
|
||||||
H.span ! A.class_ "innerTitle" $ toHtml topText
|
H.span ! A.class_ "innerTitle" $ toHtml topText
|
||||||
H.div ! A.class_ "innerContainer" $ do
|
H.div ! A.class_ "innerContainer" $ do
|
||||||
H.ul $ if' showAll
|
H.ul $ if' showAll
|
||||||
(sequence_ $ map showEntry entries)
|
(mapM_ showEntry entries)
|
||||||
(sequence_ . take 6 $ map showEntry entries)
|
(mapM_ showEntry $ take 6 entries)
|
||||||
getFooterLinks footerLinks
|
getFooterLinks footerLinks
|
||||||
where
|
where
|
||||||
showEntry :: Entry -> Html
|
showEntry :: Entry -> Html
|
||||||
|
@ -123,7 +123,7 @@ renderCommentBox cLang cId = do
|
||||||
|
|
||||||
renderComments :: [Comment] -> BlogLang -> Html
|
renderComments :: [Comment] -> BlogLang -> Html
|
||||||
renderComments [] lang = H.li $ toHtml $ noComments lang
|
renderComments [] lang = H.li $ toHtml $ noComments lang
|
||||||
renderComments comments lang = sequence_ $ map showComment comments
|
renderComments comments lang = mapM_ showComment comments
|
||||||
where
|
where
|
||||||
showComment :: Comment -> Html
|
showComment :: Comment -> Html
|
||||||
showComment (Comment{..}) = H.li $ do
|
showComment (Comment{..}) = H.li $ do
|
||||||
|
@ -222,7 +222,7 @@ adminEntryList :: [Entry] -> Html
|
||||||
adminEntryList entries = adminTemplate "Entrylist" $
|
adminEntryList entries = adminTemplate "Entrylist" $
|
||||||
H.div ! A.style "float: center;" $ do
|
H.div ! A.style "float: center;" $ do
|
||||||
H.table $ do
|
H.table $ do
|
||||||
sequence_ $ map showEntryItem entries
|
mapM_ showEntryItem entries
|
||||||
adminFooter
|
adminFooter
|
||||||
where
|
where
|
||||||
showEntryItem :: Entry -> Html
|
showEntryItem :: Entry -> Html
|
||||||
|
|
Loading…
Reference in a new issue