Removed json-* deps

This commit is contained in:
Michael Snoyman 2010-12-25 20:41:13 +02:00
parent 1d523ce8d1
commit 3a47bf948e
3 changed files with 0 additions and 23 deletions

View File

@ -73,8 +73,6 @@ import Data.Enumerator (Enumerator)
import Blaze.ByteString.Builder (Builder, fromByteString, fromLazyByteString)
import Data.Monoid (mempty)
import qualified Data.JSON.Types as J
import qualified Text.JSON.Enumerator as J
import Text.Hamlet (Html)
import Text.Blaze.Renderer.Utf8 (renderHtmlBuilder)
@ -103,8 +101,6 @@ instance ToContent Text where
toContent = toContent . Data.Text.Lazy.Encoding.encodeUtf8
instance ToContent String where
toContent = toContent . T.pack
instance ToContent J.Value where
toContent = ContentBuilder . J.renderValue
instance ToContent Html where
toContent = ContentBuilder . renderHtmlBuilder

View File

@ -17,8 +17,6 @@ module Yesod.Core
-- * Utitlities
, maybeAuthorized
, widgetToPageContent
, defaultLayoutJson
, jsonToRepJson
, redirectToPost
-- * Defaults
, defaultErrorHandler
@ -58,7 +56,6 @@ import Text.Hamlet
import Text.Cassius
import Text.Julius
import Web.Routes
import qualified Data.JSON.Types as J
import Blaze.ByteString.Builder (toLazyByteString)
#if TEST
@ -298,20 +295,6 @@ breadcrumbs = do
(title, next) <- breadcrumb this
go ((this, title) : back) next
-- | Provide both an HTML and JSON representation for a piece of data, using
-- the default layout for the HTML output ('defaultLayout').
defaultLayoutJson :: Yesod master
=> GWidget sub master ()
-> J.Value
-> GHandler sub master RepHtmlJson
defaultLayoutJson w json = do
RepHtml html' <- defaultLayout w
return $ RepHtmlJson html' $ toContent json
-- | Wraps the 'Content' generated by 'jsonToContent' in a 'RepJson'.
jsonToRepJson :: J.Value -> GHandler sub master RepJson
jsonToRepJson = return . RepJson . toContent
applyLayout' :: Yesod master
=> Html -- ^ title
-> Hamlet (Route master) -- ^ body

View File

@ -48,8 +48,6 @@ library
, monad-peel >= 0.1 && < 0.2
, enumerator >= 0.4 && < 0.5
, cookie >= 0.0 && < 0.1
, json-enumerator >= 0.0 && < 0.1
, json-types >= 0.1 && < 0.2
, blaze-html >= 0.3.0.4 && < 0.4
exposed-modules: Yesod.Content
Yesod.Core