webdriver 0.6.3 → 0.6.3.1
raw patch · 3 files changed
+6/−7 lines, 3 files
Files
- CHANGELOG.md +3/−0
- src/Test/WebDriver/JSON.hs +2/−6
- webdriver.cabal +1/−1
CHANGELOG.md view
@@ -1,4 +1,7 @@ #Change Log+##0.6.3.1+* Fixed an issue with aeson 0.10 support+ ##0.6.3 * Support aeson 0.10 * Added support for multiple HTTP attempts per command request, using the new WDConfig field wdHTTPRetryCount
src/Test/WebDriver/JSON.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE OverloadedStrings, FlexibleContexts, DeriveDataTypeable, CPP #-}+{-# LANGUAGE OverloadedStrings, FlexibleContexts, DeriveDataTypeable #-} -- |A collection of convenience functions for using and parsing JSON values -- within 'WD'. All monadic parse errors are converted to asynchronous -- 'BadJSON' exceptions.@@ -38,6 +38,7 @@ import qualified Data.Attoparsec.ByteString.Lazy as AP import qualified Data.HashMap.Strict as HM +import Control.Monad (join) import Control.Applicative import Control.Monad.Trans.Control import Control.Exception.Lifted@@ -91,17 +92,12 @@ (!:) :: (MonadBaseControl IO wd, FromJSON a) => Object -> Text -> wd a o !: k = aesonResultToWD $ parse (.: k) o - -- |Emulates the behavior of '.:?' in Aeson versions \< 0.10, allowing the field to be either missing or 'Null' if the result type is a 'Maybe'. -- In newer Aeson versions (\>= 0.10), this is equivalent to: -- -- > fmap join (o .:? k) (.:??) :: FromJSON a => Object -> Text -> Parser (Maybe a)-#if MIN_VERSION_aeson(0,10,0) o .:?? k = fmap join (o .:? k)-#else-(.:??) = (.:?)-#endif -- |Parse a JSON 'Object' as a pair. The first two string arguments specify the
webdriver.cabal view
@@ -1,5 +1,5 @@ Name: webdriver-Version: 0.6.3+Version: 0.6.3.1 Cabal-Version: >= 1.8 License: BSD3 License-File: LICENSE