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 Original file line Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Main idea: Using the `preEscapedText` from the package `blaze-markup`
runghc runghc
--package yesod --package yesod
--package text --package text
--package blaze-markup
-} -}




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


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


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

0 comments on commit e3caf8c

Please sign in to comment.