Skip to content

Commit

Permalink
Remove blaze-markup dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
psibi committed Apr 12, 2018
1 parent f0ebefa commit e3caf8c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions snippets/Render-Html.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Main idea: Using the `preEscapedText` from the package `blaze-markup`
runghc
--package yesod
--package text
--package blaze-markup
-}


Expand All @@ -20,7 +19,6 @@ Main idea: Using the `preEscapedText` from the package `blaze-markup`
{-# LANGUAGE TypeFamilies #-}
import Yesod
import Data.Text
import Text.Blaze (preEscapedText)
import qualified Data.Text.IO as TIO

data HelloWorld = HelloWorld
Expand All @@ -37,7 +35,7 @@ htmlFilePath = "/home/sibi/hello.html"
getHomeR :: Handler Html
getHomeR = do
htmlContent <- liftIO $ TIO.readFile htmlFilePath
return $ preEscapedText htmlContent
return $ preEscapedToMarkup htmlContent

main :: IO ()
main = warp 3000 HelloWorld
Expand Down

0 comments on commit e3caf8c

Please sign in to comment.