Skip to content

Commit

Permalink
Hide constructors deprecated a decade ago
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodigrim committed Oct 30, 2023
1 parent 2b7cb2b commit 6ef52e0
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 61 deletions.
10 changes: 5 additions & 5 deletions Codec/Compression/GZip.hs
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,23 @@ module Codec.Compression.GZip (
DecompressParams(..), defaultDecompressParams,

-- ** The compression parameter types
CompressionLevel(..),
CompressionLevel,
defaultCompression,
noCompression,
bestSpeed,
bestCompression,
compressionLevel,
Method(..),
Method,
deflateMethod,
WindowBits(..),
WindowBits,
defaultWindowBits,
windowBits,
MemoryLevel(..),
MemoryLevel,
defaultMemoryLevel,
minMemoryLevel,
maxMemoryLevel,
memoryLevel,
CompressionStrategy(..),
CompressionStrategy,
defaultStrategy,
filteredStrategy,
huffmanOnlyStrategy,
Expand Down
10 changes: 5 additions & 5 deletions Codec/Compression/Zlib.hs
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,23 @@ module Codec.Compression.Zlib (
DecompressParams(..), defaultDecompressParams,

-- ** The compression parameter types
CompressionLevel(..),
CompressionLevel,
defaultCompression,
noCompression,
bestSpeed,
bestCompression,
compressionLevel,
Method(..),
Method,
deflateMethod,
WindowBits(..),
WindowBits,
defaultWindowBits,
windowBits,
MemoryLevel(..),
MemoryLevel,
defaultMemoryLevel,
minMemoryLevel,
maxMemoryLevel,
memoryLevel,
CompressionStrategy(..),
CompressionStrategy,
defaultStrategy,
filteredStrategy,
huffmanOnlyStrategy,
Expand Down
12 changes: 6 additions & 6 deletions Codec/Compression/Zlib/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -46,28 +46,28 @@ module Codec.Compression.Zlib.Internal (
defaultCompressParams,
DecompressParams(..),
defaultDecompressParams,
Stream.Format(..),
Stream.Format,
Stream.gzipFormat,
Stream.zlibFormat,
Stream.rawFormat,
Stream.gzipOrZlibFormat,
Stream.CompressionLevel(..),
Stream.CompressionLevel,
Stream.defaultCompression,
Stream.noCompression,
Stream.bestSpeed,
Stream.bestCompression,
Stream.compressionLevel,
Stream.Method(..),
Stream.Method,
Stream.deflateMethod,
Stream.WindowBits(..),
Stream.WindowBits,
Stream.defaultWindowBits,
Stream.windowBits,
Stream.MemoryLevel(..),
Stream.MemoryLevel,
Stream.defaultMemoryLevel,
Stream.minMemoryLevel,
Stream.maxMemoryLevel,
Stream.memoryLevel,
Stream.CompressionStrategy(..),
Stream.CompressionStrategy,
Stream.defaultStrategy,
Stream.filteredStrategy,
Stream.huffmanOnlyStrategy,
Expand Down
10 changes: 5 additions & 5 deletions Codec/Compression/Zlib/Raw.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,23 @@ module Codec.Compression.Zlib.Raw (
DecompressParams(..), defaultDecompressParams,

-- ** The compression parameter types
CompressionLevel(..),
CompressionLevel,
defaultCompression,
noCompression,
bestSpeed,
bestCompression,
compressionLevel,
Method(..),
Method,
deflateMethod,
WindowBits(..),
WindowBits,
defaultWindowBits,
windowBits,
MemoryLevel(..),
MemoryLevel,
defaultMemoryLevel,
minMemoryLevel,
maxMemoryLevel,
memoryLevel,
CompressionStrategy(..),
CompressionStrategy,
defaultStrategy,
filteredStrategy,
huffmanOnlyStrategy,
Expand Down
46 changes: 6 additions & 40 deletions Codec/Compression/Zlib/Stream.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -30,29 +30,29 @@ module Codec.Compression.Zlib.Stream (
inflateInit,

-- ** Initialisation parameters
Format(..),
Format,
gzipFormat,
zlibFormat,
rawFormat,
gzipOrZlibFormat,
formatSupportsDictionary,
CompressionLevel(..),
CompressionLevel,
defaultCompression,
noCompression,
bestSpeed,
bestCompression,
compressionLevel,
Method(..),
Method,
deflateMethod,
WindowBits(..),
WindowBits,
defaultWindowBits,
windowBits,
MemoryLevel(..),
MemoryLevel,
defaultMemoryLevel,
minMemoryLevel,
maxMemoryLevel,
memoryLevel,
CompressionStrategy(..),
CompressionStrategy,
defaultStrategy,
filteredStrategy,
huffmanOnlyStrategy,
Expand Down Expand Up @@ -608,11 +608,6 @@ data Format = GZip | Zlib | Raw | GZipOrZlib
#endif
)

{-# DEPRECATED GZip "Use 'gzipFormat'. 'Format' constructors will be hidden in version 0.7." #-}
{-# DEPRECATED Zlib "Use 'zlibFormat'. 'Format' constructors will be hidden in version 0.7." #-}
{-# DEPRECATED Raw "Use 'rawFormat'. 'Format' constructors will be hidden in version 0.7." #-}
{-# DEPRECATED GZipOrZlib "Use 'gzipOrZlibFormat'. 'Format' constructors will be hidden in version 0.7." #-}

-- | The gzip format uses a header with a checksum and some optional meta-data
-- about the compressed file. It is intended primarily for compressing
-- individual files but is also sometimes used for network protocols such as
Expand Down Expand Up @@ -657,8 +652,6 @@ data Method = Deflated
#endif
)

{-# DEPRECATED Deflated "Use 'deflateMethod'. 'Method' constructors will be hidden in version 0.7." #-}

-- | The only method supported in this version of zlib.
-- Indeed it is likely to be the only method that ever will be supported.
--
Expand All @@ -679,7 +672,6 @@ data CompressionLevel =
| BestSpeed
| BestCompression
| CompressionLevel Int
-- ^ Use 'compressionLevel'. 'CompressionLevel' constructors will be hidden in version 0.7.
deriving
( Eq
, Ord -- ^ @since 0.7.0.0
Expand All @@ -690,13 +682,6 @@ data CompressionLevel =
#endif
)

{-# DEPRECATED DefaultCompression "Use 'defaultCompression'. 'CompressionLevel' constructors will be hidden in version 0.7." #-}
{-# DEPRECATED NoCompression "Use 'noCompression'. 'CompressionLevel' constructors will be hidden in version 0.7." #-}
{-# DEPRECATED BestSpeed "Use 'bestSpeed'. 'CompressionLevel' constructors will be hidden in version 0.7." #-}
{-# DEPRECATED BestCompression "Use 'bestCompression'. 'CompressionLevel' constructors will be hidden in version 0.7." #-}
--FIXME: cannot deprecate constructor named the same as the type
{- DEPRECATED CompressionLevel "Use 'compressionLevel'. 'CompressionLevel' constructors will be hidden in version 0.7." -}

-- | The default compression level is 6 (that is, biased towards higher
-- compression at expense of speed).
defaultCompression :: CompressionLevel
Expand Down Expand Up @@ -743,8 +728,6 @@ fromCompressionLevel (CompressionLevel n)
-- 'MemoryLevel'. See the 'MemoryLevel' for the details.
--
data WindowBits = WindowBits Int
-- ^ Use 'windowBits'.
-- 'WindowBits' constructors will be hidden in version 0.7.
| DefaultWindowBits -- This constructor must be last to make
-- the Ord instance work. The Ord instance
-- is used by the tests.
Expand All @@ -760,10 +743,6 @@ data WindowBits = WindowBits Int
#endif
)

{-# DEPRECATED DefaultWindowBits "Use 'defaultWindowBits'. 'WindowBits' constructors will be hidden in version 0.7." #-}
--FIXME: cannot deprecate constructor named the same as the type
{- DEPRECATED WindowBits "Use 'windowBits'. 'WindowBits' constructors will be hidden in version 0.7." -}

-- | The default 'WindowBits' is 15 which is also the maximum size.
--
defaultWindowBits :: WindowBits
Expand Down Expand Up @@ -814,7 +793,6 @@ data MemoryLevel =
| MinMemoryLevel
| MaxMemoryLevel
| MemoryLevel Int
-- ^ Use 'memoryLevel'. 'MemoryLevel' constructors will be hidden in version 0.7.
deriving
( Eq
, Ord -- ^ @since 0.7.0.0
Expand All @@ -825,12 +803,6 @@ data MemoryLevel =
#endif
)

{-# DEPRECATED DefaultMemoryLevel "Use 'defaultMemoryLevel'. 'MemoryLevel' constructors will be hidden in version 0.7." #-}
{-# DEPRECATED MinMemoryLevel "Use 'minMemoryLevel'. 'MemoryLevel' constructors will be hidden in version 0.7." #-}
{-# DEPRECATED MaxMemoryLevel "Use 'maxMemoryLevel'. 'MemoryLevel' constructors will be hidden in version 0.7." #-}
--FIXME: cannot deprecate constructor named the same as the type
{- DEPRECATED MemoryLevel "Use 'memoryLevel'. 'MemoryLevel' constructors will be hidden in version 0.7." -}

-- | The default memory level. (Equivalent to @'memoryLevel' 8@)
--
defaultMemoryLevel :: MemoryLevel
Expand Down Expand Up @@ -883,12 +855,6 @@ data CompressionStrategy =
#endif
)

{-# DEPRECATED DefaultStrategy "Use 'defaultStrategy'. 'CompressionStrategy' constructors will be hidden in version 0.7." #-}
{-# DEPRECATED Filtered "Use 'filteredStrategy'. 'CompressionStrategy' constructors will be hidden in version 0.7." #-}
{-# DEPRECATED HuffmanOnly "Use 'huffmanOnlyStrategy'. 'CompressionStrategy' constructors will be hidden in version 0.7." #-}
{-# DEPRECATED RLE "Use 'rleStrategy'. 'CompressionStrategy' constructors will be hidden in version 0.7." #-}
{-# DEPRECATED Fixed "Use 'fixedStrategy'. 'CompressionStrategy' constructors will be hidden in version 0.7." #-}

-- | Use this default compression strategy for normal data.
--
defaultStrategy :: CompressionStrategy
Expand Down

0 comments on commit 6ef52e0

Please sign in to comment.