Permalink
Browse files

Update example in documentation of Text.Blaze

 * Use toHtml instead of string
 * Add missing import for forM_
  • Loading branch information...
1 parent 6e6cab5 commit abab270b88933def3a0f577f2c2947629e9971f8 @sol sol committed Nov 20, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 Text/Blaze.hs
View
4 Text/Blaze.hs
@@ -17,6 +17,8 @@
--
-- Now, you can describe pages using the imported combinators.
--
+-- > import Control.Monad
+-- >
-- > page1 :: Html
-- > page1 = html $ do
-- > head $ do
@@ -25,7 +27,7 @@
-- > body $ do
-- > div ! id "header" $ "Syntax"
-- > p "This is an example of BlazeHtml syntax."
--- > ul $ forM_ [1, 2, 3] (li . string . show)
+-- > ul $ forM_ [1, 2, 3] (li . toHtml . show)
--
-- The resulting HTML can now be extracted using:
--

0 comments on commit abab270

Please sign in to comment.