Skip to content

Instantly share code, notes, and snippets.

@fusion5
Created September 23, 2010 06:13
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 fusion5/593213 to your computer and use it in GitHub Desktop.
Save fusion5/593213 to your computer and use it in GitHub Desktop.
{-# LANGUAGE TypeSynonymInstances #-}
module Blaze (
module Text.Blaze.Renderer.String
, module Text.Blaze
) where
import qualified Data.ByteString.Char8 as B
import qualified Data.ByteString.Lazy.UTF8 as LU (toString, fromString)
import Text.Blaze
import Text.Blaze.Renderer.String
import qualified Text.Blaze.Html5 as H
import qualified Text.Blaze.Html5.Attributes as A
import Happstack.Server.SimpleHTTP
instance ToMessage H.Html where
toContentType _ = B.pack "text/html; charset=UTF-8"
toMessage = LU.fromString . renderHtml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment