From ca8f7f3bd29393c356c8255f1ecd2f3b77add97a Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Fri, 9 Jun 2023 14:09:43 +0300 Subject: [PATCH] Resolve #993: Remove Data.Aeson.Internal and .Time modules --- aeson.cabal | 2 -- src/Data/Aeson.hs | 3 +-- src/Data/Aeson/Internal.hs | 28 -------------------------- src/Data/Aeson/Internal/Time.hs | 21 ------------------- tests/UnitTests/NullaryConstructors.hs | 3 +-- 5 files changed, 2 insertions(+), 55 deletions(-) delete mode 100644 src/Data/Aeson/Internal.hs delete mode 100644 src/Data/Aeson/Internal/Time.hs diff --git a/aeson.cabal b/aeson.cabal index 71d33b711..794845f7a 100644 --- a/aeson.cabal +++ b/aeson.cabal @@ -63,8 +63,6 @@ library Data.Aeson.Decoding.Tokens Data.Aeson.Encoding Data.Aeson.Encoding.Internal - Data.Aeson.Internal - Data.Aeson.Internal.Time Data.Aeson.Key Data.Aeson.KeyMap Data.Aeson.Parser diff --git a/src/Data/Aeson.hs b/src/Data/Aeson.hs index b3ae55d4c..de389f1d6 100644 --- a/src/Data/Aeson.hs +++ b/src/Data/Aeson.hs @@ -160,11 +160,10 @@ module Data.Aeson import Control.Exception (Exception (..)) import Control.Monad.Catch (MonadThrow (..)) -import Data.Aeson.Types.FromJSON (ifromJSON, parseIndexedJSON) +import Data.Aeson.Types.FromJSON (parseIndexedJSON) import Data.Aeson.Encoding (encodingToLazyByteString) import Data.Aeson.Parser.Internal (decodeWith, decodeStrictWith, eitherDecodeWith, eitherDecodeStrictWith, jsonEOF, json, jsonEOF', json') import Data.Aeson.Types -import Data.Aeson.Types.Internal (formatError) import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as L diff --git a/src/Data/Aeson/Internal.hs b/src/Data/Aeson/Internal.hs deleted file mode 100644 index ac2631c7c..000000000 --- a/src/Data/Aeson/Internal.hs +++ /dev/null @@ -1,28 +0,0 @@ -{-# LANGUAGE NoImplicitPrelude #-} --- | --- Module: Data.Aeson.Internal --- Copyright: (c) 2015-2016 Bryan O'Sullivan --- License: BSD3 --- Maintainer: Bryan O'Sullivan --- Stability: experimental --- Portability: portable --- --- Internal types and functions. --- --- __Note__: all declarations in this module are unstable, and prone --- to being changed at any time. - -module Data.Aeson.Internal - {-# DEPRECATED "All contents of this module are exported from Data.Aeson.Types module. This module will be removed in the next major aeson version." #-} - ( - IResult(..) - , JSONPathElement(..) - , JSONPath - , () - , formatError - , ifromJSON - , iparse - ) where - -import Data.Aeson.Types.Internal -import Data.Aeson.Types.FromJSON (ifromJSON) diff --git a/src/Data/Aeson/Internal/Time.hs b/src/Data/Aeson/Internal/Time.hs deleted file mode 100644 index 42a2ca63b..000000000 --- a/src/Data/Aeson/Internal/Time.hs +++ /dev/null @@ -1,21 +0,0 @@ -{-# LANGUAGE CPP #-} - --- | --- Module: Data.Aeson.Internal.Time --- Copyright: (c) 2015-2016 Bryan O'Sullivan --- License: BSD3 --- Maintainer: Bryan O'Sullivan --- Stability: experimental --- Portability: portable - -module Data.Aeson.Internal.Time - {-# DEPRECATED "This module will be removed in the next major aeson version." #-} - ( - TimeOfDay64(..) - , fromPico - , toPico - , diffTimeOfDay64 - , toTimeOfDay64 - ) where - -import Data.Attoparsec.Time.Internal diff --git a/tests/UnitTests/NullaryConstructors.hs b/tests/UnitTests/NullaryConstructors.hs index dcc19cace..820f3c82c 100644 --- a/tests/UnitTests/NullaryConstructors.hs +++ b/tests/UnitTests/NullaryConstructors.hs @@ -11,8 +11,7 @@ module UnitTests.NullaryConstructors import Prelude.Compat import Data.Aeson (decode, eitherDecode, fromEncoding, Value) -import Data.Aeson.Internal (IResult (..), iparse) -import Data.Aeson.Types (Parser) +import Data.Aeson.Types (Parser, IResult (..), iparse) import Data.ByteString.Builder (toLazyByteString) import Data.Foldable (for_) import Data.Maybe (fromJust)