diff --git a/yesod-auth/Yesod/Auth.hs b/yesod-auth/Yesod/Auth.hs index 07b9ed86..d662e87d 100644 --- a/yesod-auth/Yesod/Auth.hs +++ b/yesod-auth/Yesod/Auth.hs @@ -34,7 +34,11 @@ import Data.Text.Encoding (decodeUtf8With) import Data.Text.Encoding.Error (lenientDecode) import Data.Text (Text) import qualified Data.Text as T +#if MIN_VERSION_aeson(0, 4, 0) +import qualified Data.HashMap.Lazy as Map +#else import qualified Data.Map as Map +#endif import Language.Haskell.TH.Syntax hiding (lift) diff --git a/yesod-auth/yesod-auth.cabal b/yesod-auth/yesod-auth.cabal index 15cab177..72881010 100644 --- a/yesod-auth/yesod-auth.cabal +++ b/yesod-auth/yesod-auth.cabal @@ -1,5 +1,5 @@ name: yesod-auth -version: 0.7.6.1 +version: 0.7.6.2 license: BSD3 license-file: LICENSE author: Michael Snoyman, Patrick Brisbin @@ -36,7 +36,8 @@ library , hamlet >= 0.10 && < 0.11 , shakespeare-css >= 0.10 && < 0.11 , yesod-json >= 0.2 && < 0.3 - , containers >= 0.2 && < 0.5 + , containers + , unordered-containers , yesod-form >= 0.3 && < 0.4 , transformers >= 0.2.2 && < 0.3 , persistent >= 0.6 && < 0.7 diff --git a/yesod-json/Yesod/Json.hs b/yesod-json/Yesod/Json.hs index bdc8ccc1..9a3537e8 100644 --- a/yesod-json/Yesod/Json.hs +++ b/yesod-json/Yesod/Json.hs @@ -1,4 +1,5 @@ {-# LANGUAGE TypeSynonymInstances #-} +{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Yesod.Json ( -- * Convert from a JSON value @@ -23,7 +24,11 @@ import qualified Data.Aeson.Encode as JE import Data.Aeson.Encode (fromValue) import Data.Text (pack) import Control.Arrow (first) +#if MIN_VERSION_aeson(0, 4, 0) +import Data.HashMap.Strict (fromList) +#else import Data.Map (fromList) +#endif import qualified Data.Vector as V import Text.Julius (ToJavascript (..)) import Data.Text.Lazy.Builder (fromLazyText) diff --git a/yesod-json/yesod-json.cabal b/yesod-json/yesod-json.cabal index 2a52c5b4..9f41ea1e 100644 --- a/yesod-json/yesod-json.cabal +++ b/yesod-json/yesod-json.cabal @@ -1,5 +1,5 @@ name: yesod-json -version: 0.2.2 +version: 0.2.2.1 license: BSD3 license-file: LICENSE author: Michael Snoyman @@ -20,6 +20,7 @@ library , shakespeare-js >= 0.10 && < 0.11 , vector >= 0.9 , containers >= 0.2 && < 0.5 + , unordered-containers exposed-modules: Yesod.Json ghc-options: -Wall