Skip to content

Commit 6ef52e0

Browse files
committed
Hide constructors deprecated a decade ago
1 parent 2b7cb2b commit 6ef52e0

File tree

5 files changed

+27
-61
lines changed

5 files changed

+27
-61
lines changed

Codec/Compression/GZip.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,23 +43,23 @@ module Codec.Compression.GZip (
4343
DecompressParams(..), defaultDecompressParams,
4444

4545
-- ** The compression parameter types
46-
CompressionLevel(..),
46+
CompressionLevel,
4747
defaultCompression,
4848
noCompression,
4949
bestSpeed,
5050
bestCompression,
5151
compressionLevel,
52-
Method(..),
52+
Method,
5353
deflateMethod,
54-
WindowBits(..),
54+
WindowBits,
5555
defaultWindowBits,
5656
windowBits,
57-
MemoryLevel(..),
57+
MemoryLevel,
5858
defaultMemoryLevel,
5959
minMemoryLevel,
6060
maxMemoryLevel,
6161
memoryLevel,
62-
CompressionStrategy(..),
62+
CompressionStrategy,
6363
defaultStrategy,
6464
filteredStrategy,
6565
huffmanOnlyStrategy,

Codec/Compression/Zlib.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,23 @@ module Codec.Compression.Zlib (
3131
DecompressParams(..), defaultDecompressParams,
3232

3333
-- ** The compression parameter types
34-
CompressionLevel(..),
34+
CompressionLevel,
3535
defaultCompression,
3636
noCompression,
3737
bestSpeed,
3838
bestCompression,
3939
compressionLevel,
40-
Method(..),
40+
Method,
4141
deflateMethod,
42-
WindowBits(..),
42+
WindowBits,
4343
defaultWindowBits,
4444
windowBits,
45-
MemoryLevel(..),
45+
MemoryLevel,
4646
defaultMemoryLevel,
4747
minMemoryLevel,
4848
maxMemoryLevel,
4949
memoryLevel,
50-
CompressionStrategy(..),
50+
CompressionStrategy,
5151
defaultStrategy,
5252
filteredStrategy,
5353
huffmanOnlyStrategy,

Codec/Compression/Zlib/Internal.hs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,28 +46,28 @@ module Codec.Compression.Zlib.Internal (
4646
defaultCompressParams,
4747
DecompressParams(..),
4848
defaultDecompressParams,
49-
Stream.Format(..),
49+
Stream.Format,
5050
Stream.gzipFormat,
5151
Stream.zlibFormat,
5252
Stream.rawFormat,
5353
Stream.gzipOrZlibFormat,
54-
Stream.CompressionLevel(..),
54+
Stream.CompressionLevel,
5555
Stream.defaultCompression,
5656
Stream.noCompression,
5757
Stream.bestSpeed,
5858
Stream.bestCompression,
5959
Stream.compressionLevel,
60-
Stream.Method(..),
60+
Stream.Method,
6161
Stream.deflateMethod,
62-
Stream.WindowBits(..),
62+
Stream.WindowBits,
6363
Stream.defaultWindowBits,
6464
Stream.windowBits,
65-
Stream.MemoryLevel(..),
65+
Stream.MemoryLevel,
6666
Stream.defaultMemoryLevel,
6767
Stream.minMemoryLevel,
6868
Stream.maxMemoryLevel,
6969
Stream.memoryLevel,
70-
Stream.CompressionStrategy(..),
70+
Stream.CompressionStrategy,
7171
Stream.defaultStrategy,
7272
Stream.filteredStrategy,
7373
Stream.huffmanOnlyStrategy,

Codec/Compression/Zlib/Raw.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,23 @@ module Codec.Compression.Zlib.Raw (
2727
DecompressParams(..), defaultDecompressParams,
2828

2929
-- ** The compression parameter types
30-
CompressionLevel(..),
30+
CompressionLevel,
3131
defaultCompression,
3232
noCompression,
3333
bestSpeed,
3434
bestCompression,
3535
compressionLevel,
36-
Method(..),
36+
Method,
3737
deflateMethod,
38-
WindowBits(..),
38+
WindowBits,
3939
defaultWindowBits,
4040
windowBits,
41-
MemoryLevel(..),
41+
MemoryLevel,
4242
defaultMemoryLevel,
4343
minMemoryLevel,
4444
maxMemoryLevel,
4545
memoryLevel,
46-
CompressionStrategy(..),
46+
CompressionStrategy,
4747
defaultStrategy,
4848
filteredStrategy,
4949
huffmanOnlyStrategy,

Codec/Compression/Zlib/Stream.hsc

Lines changed: 6 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -30,29 +30,29 @@ module Codec.Compression.Zlib.Stream (
3030
inflateInit,
3131

3232
-- ** Initialisation parameters
33-
Format(..),
33+
Format,
3434
gzipFormat,
3535
zlibFormat,
3636
rawFormat,
3737
gzipOrZlibFormat,
3838
formatSupportsDictionary,
39-
CompressionLevel(..),
39+
CompressionLevel,
4040
defaultCompression,
4141
noCompression,
4242
bestSpeed,
4343
bestCompression,
4444
compressionLevel,
45-
Method(..),
45+
Method,
4646
deflateMethod,
47-
WindowBits(..),
47+
WindowBits,
4848
defaultWindowBits,
4949
windowBits,
50-
MemoryLevel(..),
50+
MemoryLevel,
5151
defaultMemoryLevel,
5252
minMemoryLevel,
5353
maxMemoryLevel,
5454
memoryLevel,
55-
CompressionStrategy(..),
55+
CompressionStrategy,
5656
defaultStrategy,
5757
filteredStrategy,
5858
huffmanOnlyStrategy,
@@ -608,11 +608,6 @@ data Format = GZip | Zlib | Raw | GZipOrZlib
608608
#endif
609609
)
610610

611-
{-# DEPRECATED GZip "Use 'gzipFormat'. 'Format' constructors will be hidden in version 0.7." #-}
612-
{-# DEPRECATED Zlib "Use 'zlibFormat'. 'Format' constructors will be hidden in version 0.7." #-}
613-
{-# DEPRECATED Raw "Use 'rawFormat'. 'Format' constructors will be hidden in version 0.7." #-}
614-
{-# DEPRECATED GZipOrZlib "Use 'gzipOrZlibFormat'. 'Format' constructors will be hidden in version 0.7." #-}
615-
616611
-- | The gzip format uses a header with a checksum and some optional meta-data
617612
-- about the compressed file. It is intended primarily for compressing
618613
-- individual files but is also sometimes used for network protocols such as
@@ -657,8 +652,6 @@ data Method = Deflated
657652
#endif
658653
)
659654

660-
{-# DEPRECATED Deflated "Use 'deflateMethod'. 'Method' constructors will be hidden in version 0.7." #-}
661-
662655
-- | The only method supported in this version of zlib.
663656
-- Indeed it is likely to be the only method that ever will be supported.
664657
--
@@ -679,7 +672,6 @@ data CompressionLevel =
679672
| BestSpeed
680673
| BestCompression
681674
| CompressionLevel Int
682-
-- ^ Use 'compressionLevel'. 'CompressionLevel' constructors will be hidden in version 0.7.
683675
deriving
684676
( Eq
685677
, Ord -- ^ @since 0.7.0.0
@@ -690,13 +682,6 @@ data CompressionLevel =
690682
#endif
691683
)
692684

693-
{-# DEPRECATED DefaultCompression "Use 'defaultCompression'. 'CompressionLevel' constructors will be hidden in version 0.7." #-}
694-
{-# DEPRECATED NoCompression "Use 'noCompression'. 'CompressionLevel' constructors will be hidden in version 0.7." #-}
695-
{-# DEPRECATED BestSpeed "Use 'bestSpeed'. 'CompressionLevel' constructors will be hidden in version 0.7." #-}
696-
{-# DEPRECATED BestCompression "Use 'bestCompression'. 'CompressionLevel' constructors will be hidden in version 0.7." #-}
697-
--FIXME: cannot deprecate constructor named the same as the type
698-
{- DEPRECATED CompressionLevel "Use 'compressionLevel'. 'CompressionLevel' constructors will be hidden in version 0.7." -}
699-
700685
-- | The default compression level is 6 (that is, biased towards higher
701686
-- compression at expense of speed).
702687
defaultCompression :: CompressionLevel
@@ -743,8 +728,6 @@ fromCompressionLevel (CompressionLevel n)
743728
-- 'MemoryLevel'. See the 'MemoryLevel' for the details.
744729
--
745730
data WindowBits = WindowBits Int
746-
-- ^ Use 'windowBits'.
747-
-- 'WindowBits' constructors will be hidden in version 0.7.
748731
| DefaultWindowBits -- This constructor must be last to make
749732
-- the Ord instance work. The Ord instance
750733
-- is used by the tests.
@@ -760,10 +743,6 @@ data WindowBits = WindowBits Int
760743
#endif
761744
)
762745

763-
{-# DEPRECATED DefaultWindowBits "Use 'defaultWindowBits'. 'WindowBits' constructors will be hidden in version 0.7." #-}
764-
--FIXME: cannot deprecate constructor named the same as the type
765-
{- DEPRECATED WindowBits "Use 'windowBits'. 'WindowBits' constructors will be hidden in version 0.7." -}
766-
767746
-- | The default 'WindowBits' is 15 which is also the maximum size.
768747
--
769748
defaultWindowBits :: WindowBits
@@ -814,7 +793,6 @@ data MemoryLevel =
814793
| MinMemoryLevel
815794
| MaxMemoryLevel
816795
| MemoryLevel Int
817-
-- ^ Use 'memoryLevel'. 'MemoryLevel' constructors will be hidden in version 0.7.
818796
deriving
819797
( Eq
820798
, Ord -- ^ @since 0.7.0.0
@@ -825,12 +803,6 @@ data MemoryLevel =
825803
#endif
826804
)
827805

828-
{-# DEPRECATED DefaultMemoryLevel "Use 'defaultMemoryLevel'. 'MemoryLevel' constructors will be hidden in version 0.7." #-}
829-
{-# DEPRECATED MinMemoryLevel "Use 'minMemoryLevel'. 'MemoryLevel' constructors will be hidden in version 0.7." #-}
830-
{-# DEPRECATED MaxMemoryLevel "Use 'maxMemoryLevel'. 'MemoryLevel' constructors will be hidden in version 0.7." #-}
831-
--FIXME: cannot deprecate constructor named the same as the type
832-
{- DEPRECATED MemoryLevel "Use 'memoryLevel'. 'MemoryLevel' constructors will be hidden in version 0.7." -}
833-
834806
-- | The default memory level. (Equivalent to @'memoryLevel' 8@)
835807
--
836808
defaultMemoryLevel :: MemoryLevel
@@ -883,12 +855,6 @@ data CompressionStrategy =
883855
#endif
884856
)
885857

886-
{-# DEPRECATED DefaultStrategy "Use 'defaultStrategy'. 'CompressionStrategy' constructors will be hidden in version 0.7." #-}
887-
{-# DEPRECATED Filtered "Use 'filteredStrategy'. 'CompressionStrategy' constructors will be hidden in version 0.7." #-}
888-
{-# DEPRECATED HuffmanOnly "Use 'huffmanOnlyStrategy'. 'CompressionStrategy' constructors will be hidden in version 0.7." #-}
889-
{-# DEPRECATED RLE "Use 'rleStrategy'. 'CompressionStrategy' constructors will be hidden in version 0.7." #-}
890-
{-# DEPRECATED Fixed "Use 'fixedStrategy'. 'CompressionStrategy' constructors will be hidden in version 0.7." #-}
891-
892858
-- | Use this default compression strategy for normal data.
893859
--
894860
defaultStrategy :: CompressionStrategy

0 commit comments

Comments
 (0)