Removed unneeded conditional

This commit is contained in:
Michael Snoyman 2013-03-10 14:04:45 +02:00
parent ee01aaf268
commit 1b8a1b9d42

View File

@ -1,5 +1,4 @@
{-# LANGUAGE TypeSynonymInstances, OverloadedStrings #-}
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Yesod.Core.Json
( -- * Convert from a JSON value
@ -90,11 +89,6 @@ parseJsonBody_ = do
J.Error s -> invalidArgs [pack s]
J.Success a -> return a
#if !MIN_VERSION_shakespeare_js(1, 0, 2)
instance ToJavascript J.Value where
toJavascript = fromLazyText . decodeUtf8 . JE.encode
#endif
-- | Convert a list of pairs to an 'J.Object'.
object :: J.ToJSON a => [(Text, a)] -> J.Value
object = J.object . map (second J.toJSON)