collection-json 1.1.0.1 → 1.1.0.2
raw patch · 5 files changed
+12/−60 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 +4/−0
- collection-json.cabal +7/−8
- src/Data/CollectionJSON.hs +1/−2
- src/External/Network/URI/JSON.hs +0/−23
- test/External/Network/URI/JSONSpec.hs +0/−27
ChangeLog.md view
@@ -1,5 +1,9 @@ # Revision history for collection-json +## 1.1.0.2 -- 2017-11-17++* use network-uri-json package+ ## 1.1.0.1 -- 2017-11-11 * reduce prop usage by using it correctly
collection-json.cabal view
@@ -1,5 +1,5 @@ name: collection-json-version: 1.1.0.1+version: 1.1.0.2 synopsis: Collection+JSON—Hypermedia Type Tools description:@@ -43,13 +43,13 @@ Data.CollectionJSON other-modules:- External.Network.URI.JSON build-depends:- aeson >= 0.8 && < 1.2- , base >= 4.6 && < 4.12- , network-uri == 2.6.*- , text == 1.2.*+ aeson >= 0.8 && < 1.2+ , base >= 4.6 && < 4.12+ , network-uri == 2.6.*+ , network-uri-json == 0.1.*+ , text == 1.2.* other-extensions: OverloadedStrings@@ -73,8 +73,6 @@ , Data.CollectionJSONSpec , 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.*@@ -85,6 +83,7 @@ , bytestring == 0.10.* , hspec == 2.4.* , network-uri == 2.6.*+ , network-uri-json == 0.1.* , QuickCheck == 2.9.* , quickcheck-instances == 0.3.* , test-invariant == 0.4.*
src/Data/CollectionJSON.hs view
@@ -18,9 +18,8 @@ import Data.Functor ((<$>)) import Data.Maybe (catMaybes) import Data.Text (Text)+import Network.URI.JSON () import Network.URI (nullURI, URI)--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)