Skip to content

Commit

Permalink
Resolve #1009: require dlist >=1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
phadej committed Jun 1, 2023
1 parent 56c2895 commit 2e8581d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion aeson.cabal
Expand Up @@ -129,7 +129,7 @@ library
build-depends:
attoparsec >=0.14.2 && <0.15
, data-fix >=0.3.2 && <0.4
, dlist >=0.8.0.4 && <1.1
, dlist >=1.0 && <1.1
, hashable >=1.3.5.0 && <1.5
, indexed-traversable >=0.1.2 && <0.2
, OneTuple >=0.3.1 && <0.5
Expand Down
4 changes: 0 additions & 4 deletions src/Data/Aeson/Types/FromJSON.hs
Expand Up @@ -130,9 +130,7 @@ import qualified Data.Aeson.KeyMap as KM
import qualified Data.Attoparsec.ByteString.Char8 as A (endOfInput, parseOnly, scientific)
import qualified Data.ByteString.Lazy as L
import qualified Data.DList as DList
#if MIN_VERSION_dlist(1,0,0)
import qualified Data.DList.DNonEmpty as DNE
#endif
import qualified Data.Fix as F
import qualified Data.HashMap.Strict as H
import qualified Data.HashSet as HashSet
Expand Down Expand Up @@ -1783,7 +1781,6 @@ instance FromJSON1 DList.DList where
instance (FromJSON a) => FromJSON (DList.DList a) where
parseJSON = parseJSON1

#if MIN_VERSION_dlist(1,0,0)
-- | @since 1.5.3.0
instance FromJSON1 DNE.DNonEmpty where
liftParseJSON p _ = withArray "DNonEmpty" $
Expand All @@ -1795,7 +1792,6 @@ instance FromJSON1 DNE.DNonEmpty where
-- | @since 1.5.3.0
instance (FromJSON a) => FromJSON (DNE.DNonEmpty a) where
parseJSON = parseJSON1
#endif

-------------------------------------------------------------------------------
-- OneTuple
Expand Down
4 changes: 0 additions & 4 deletions src/Data/Aeson/Types/ToJSON.hs
Expand Up @@ -112,9 +112,7 @@ import qualified Data.Aeson.Encoding as E
import qualified Data.Aeson.Encoding.Internal as E (InArray, comma, econcat, retagEncoding, key)
import qualified Data.ByteString.Lazy as L
import qualified Data.DList as DList
#if MIN_VERSION_dlist(1,0,0)
import qualified Data.DList.DNonEmpty as DNE
#endif
import qualified Data.Fix as F
import qualified Data.HashMap.Strict as H
import qualified Data.HashSet as HashSet
Expand Down Expand Up @@ -1553,7 +1551,6 @@ instance (ToJSON a) => ToJSON (DList.DList a) where
toJSON = toJSON1
toEncoding = toEncoding1

#if MIN_VERSION_dlist(1,0,0)
-- | @since 1.5.3.0
instance ToJSON1 DNE.DNonEmpty where
liftToJSON t _ = listValue t . DNE.toList
Expand All @@ -1563,7 +1560,6 @@ instance ToJSON1 DNE.DNonEmpty where
instance (ToJSON a) => ToJSON (DNE.DNonEmpty a) where
toJSON = toJSON1
toEncoding = toEncoding1
#endif

-------------------------------------------------------------------------------
-- OneTuple
Expand Down

0 comments on commit 2e8581d

Please sign in to comment.