Skip to content

Instantly share code, notes, and snippets.

@mango314
Created November 4, 2014 00:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mango314/af77f5b50c679c81c9ea to your computer and use it in GitHub Desktop.
Save mango314/af77f5b50c679c81c9ea to your computer and use it in GitHub Desktop.
-- variant of tutorial
-- type "./notes" in terminal
{-# LANGUAGE OverloadedStrings #-}
import Control.Monad (forM_)
import Text.Blaze.Html5
import Text.Blaze.Html5.Attributes
import qualified Text.Blaze.Html5 as H
import qualified Text.Blaze.Html5.Attributes as A
import Text.Blaze.Renderer.String as S
notes :: Html
notes = docTypeHtml $ do
H.head $ do
H.title "John´ s Notes"
body $ do
p "Hello World"
main = putStrLn (S.renderHtml notes)
<!DOCTYPE HTML>
<html><head><title>John´ s Notes</title></head><body><p>Hello World</p></body></html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment