packages feed

siren-json 0.1.0.1 → 0.1.0.2

raw patch · 5 files changed

+8/−55 lines, 5 filesdep +network-uri-jsonPVP ok

version bump matches the API change (PVP)

Dependencies added: network-uri-json

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,5 +1,9 @@ # Revision history for siren-json +## 0.1.0.2  -- 2017-11-19++* use network-uri-json package+ ## 0.1.0.1  -- 2017-11-11  * add shrink methods to Arbitrary instances
siren-json.cabal view
@@ -1,5 +1,5 @@ name:                siren-json-version:             0.1.0.1+version:             0.1.0.2 synopsis:            Siren Tools for Haskell  description:         @@ -44,7 +44,6 @@   other-modules:       External.Network.HTTP.Media.MediaType.JSON     , External.Network.HTTP.Types.Method.JSON-    , External.Network.URI.JSON    build-depends:       aeson                >= 0.8 && < 1.2@@ -54,6 +53,7 @@     , http-media           == 0.6.*     , http-types           == 0.9.*     , network-uri          == 2.6.*+    , network-uri-json     == 0.1.*     , text                 == 1.2.*     , unordered-containers == 0.2.* @@ -86,8 +86,6 @@     , External.Network.HTTP.Types.Method.JSONSpec     , External.Network.URI.Arbitrary     , External.Network.URI.ArbitrarySpec-    , External.Network.URI.JSON-    , External.Network.URI.JSONSpec    build-tool-depends:       hspec-discover:hspec-discover == 2.4.*@@ -102,6 +100,7 @@     , http-media           == 0.6.*     , http-types           == 0.9.*     , network-uri          == 2.6.*+    , network-uri-json     == 0.1.*     , QuickCheck           == 2.9.*     , quickcheck-instances == 0.3.*     , test-invariant       == 0.4.*
src/Data/SirenJSON.hs view
@@ -22,6 +22,7 @@ import Data.Text (Text) import Network.HTTP.Media (MediaType) import Network.HTTP.Types (StdMethod (GET))+import Network.URI.JSON () import Network.URI (URI)  import qualified Data.HashMap.Lazy as HashMap (fromList)@@ -29,7 +30,6 @@  import External.Network.HTTP.Media.MediaType.JSON () import External.Network.HTTP.Types.Method.JSON ()-import External.Network.URI.JSON ()  -- * Core Data Types 
− src/External/Network/URI/JSON.hs
@@ -1,23 +0,0 @@-{-# OPTIONS_GHC -fno-warn-orphans #-}--{-# LANGUAGE OverloadedStrings #-}--{-|-Module      : External.Network.URI.JSON-Description : URI FromJSON and ToJSON Instances-Copyright   : (c) Alex Brandt, 2017-License     : MIT--URI Instances for FromJSON and ToJSON--}-module External.Network.URI.JSON where--import Data.Aeson (FromJSON (parseJSON), ToJSON (toJSON), withText)-import Data.Text (unpack)-import Network.URI (parseURIReference, URI, uriToString)--instance FromJSON URI where-  parseJSON = withText "URI" $ maybe (fail "invalid URI") return . parseURIReference . unpack--instance ToJSON URI where-  toJSON u = toJSON $ uriToString id u ""
− test/External/Network/URI/JSONSpec.hs
@@ -1,27 +0,0 @@-{-|-Module      : External.Network.URI.JSONSpec-Description : Tests for External.Network.URI.JSON-Copyright   : (c) Alex Brandt, 2017-License     : MIT--Tests for "External.Network.URI.JSON".--}-module External.Network.URI.JSONSpec (main, spec) where--import Data.Aeson (decode, encode)-import Data.Maybe (fromJust)-import Network.URI (URI)-import Test.Hspec (describe, hspec, Spec)-import Test.Hspec.QuickCheck (prop)-import Test.Invariant ((<=>))--import External.Network.URI.Arbitrary ()-import External.Network.URI.JSON ()--main :: IO ()-main = hspec spec--spec :: Spec-spec =-  describe "properties" $-    prop "fromJust . decode . encode == id" (fromJust . decode . encode <=> id :: URI -> Bool)