jose 0.4.0.0 → 0.4.0.1
raw patch · 2 files changed
+6/−3 lines, 2 filesdep ~aeson
Dependency ranges changed: aeson
Files
- jose.cabal +2/−2
- src/Crypto/JOSE/Types/Orphans.hs +4/−1
jose.cabal view
@@ -1,5 +1,5 @@ name: jose-version: 0.4.0.0+version: 0.4.0.1 synopsis: Javascript Object Signing and Encryption and JSON Web Token library description:@@ -71,7 +71,7 @@ , template-haskell >= 2.4 , safe >= 0.3 , semigroups >= 0.15- , aeson >= 0.8.0.1 && < 0.10+ , aeson >= 0.8.0.1 , unordered-containers == 0.2.* , bytestring == 0.10.* , text >= 1.1
src/Crypto/JOSE/Types/Orphans.hs view
@@ -1,4 +1,4 @@--- Copyright (C) 2014 Fraser Tweedale+-- Copyright (C) 2014, 2015, 2016 Fraser Tweedale -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License.@@ -12,6 +12,7 @@ -- See the License for the specific language governing permissions and -- limitations under the License. +{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Crypto.JOSE.Types.Orphans where@@ -30,6 +31,7 @@ import Data.Aeson +#if ! MIN_VERSION_aeson(0,11,1) instance FromJSON a => FromJSON (NonEmpty a) where parseJSON = withArray "NonEmpty [a]" $ \v -> case V.toList v of [] -> fail "Non-empty list required"@@ -37,6 +39,7 @@ instance ToJSON a => ToJSON (NonEmpty a) where toJSON = Array . V.fromList . map toJSON . toList+#endif instance FromJSON URI where