Skip to content

Commit 85a5734

Browse files
committed
Fix haddocks
1 parent 8d6961c commit 85a5734

File tree

2 files changed

+35
-29
lines changed

2 files changed

+35
-29
lines changed

Codec/Compression/Zlib/Internal.hs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ data DecompressParams = DecompressParams {
144144
} deriving Show
145145

146146
-- | The default set of parameters for compression. This is typically used with
147-
-- the @compressWith@ function with specific parameters overridden.
147+
-- 'Codec.Compression.GZip.compressWith' or 'Codec.Compression.Zlib.compressWith'
148+
-- with specific parameters overridden.
148149
--
149150
defaultCompressParams :: CompressParams
150151
defaultCompressParams = CompressParams {
@@ -158,7 +159,8 @@ defaultCompressParams = CompressParams {
158159
}
159160

160161
-- | The default set of parameters for decompression. This is typically used with
161-
-- the @compressWith@ function with specific parameters overridden.
162+
-- 'Codec.Compression.GZip.decompressWith' or 'Codec.Compression.Zlib.decompressWith'
163+
-- with specific parameters overridden.
162164
--
163165
defaultDecompressParams :: DecompressParams
164166
defaultDecompressParams = DecompressParams {
@@ -181,7 +183,7 @@ defaultDecompressBufferSize = 32 * 1024 - L.chunkOverhead
181183
-- input and provision of output are interleaved.
182184
--
183185
-- To indicate the end of the input supply an empty input chunk. Note that
184-
-- for 'gzipFormat' with the default 'decompressAllMembers' @True@ you will
186+
-- for 'Stream.gzipFormat' with the default 'decompressAllMembers' @True@ you will
185187
-- have to do this, as the decompressor will look for any following members.
186188
-- With 'decompressAllMembers' @False@ the decompressor knows when the data
187189
-- ends and will produce 'DecompressStreamEnd' without you having to supply an
@@ -225,14 +227,14 @@ data DecompressError =
225227
| DictionaryRequired
226228

227229
-- | If the stream requires a dictionary and you provide one with the
228-
-- wrong 'DictionaryHash' then you will get this error.
230+
-- wrong 'Stream.DictionaryHash' then you will get this error.
229231
| DictionaryMismatch
230232

231233
-- | If the compressed data stream is corrupted in any way then you will
232234
-- get this error, for example if the input data just isn't a compressed
233235
-- zlib data stream. In particular if the data checksum turns out to be
234236
-- wrong then you will get all the decompressed data but this error at the
235-
-- end, instead of the normal successful 'StreamEnd'.
237+
-- end, instead of the normal successful 'Stream.StreamEnd'.
236238
| DataFormatError String
237239
deriving (Eq, Typeable)
238240

Codec/Compression/Zlib/Stream.hsc

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ data ErrorCode =
550550
| MemoryError
551551
| BufferError -- ^ No progress was possible or there was not enough room in
552552
-- the output buffer when 'Finish' is used. Note that
553-
-- 'BuferError' is not fatal, and 'inflate' can be called
553+
-- 'BufferError' is not fatal, and 'inflate' can be called
554554
-- again with more input and more output space to continue.
555555
| VersionError
556556
| Unexpected
@@ -608,10 +608,10 @@ 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" #-}
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." #-}
615615

616616
-- | The gzip format uses a header with a checksum and some optional meta-data
617617
-- about the compressed file. It is intended primarily for compressing
@@ -657,9 +657,9 @@ data Method = Deflated
657657
#endif
658658
)
659659

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

662-
-- | \'Deflate\' is the only method supported in this version of zlib.
662+
-- | The only method supported in this version of zlib.
663663
-- Indeed it is likely to be the only method that ever will be supported.
664664
--
665665
deflateMethod :: Method
@@ -679,18 +679,19 @@ data CompressionLevel =
679679
| BestSpeed
680680
| BestCompression
681681
| CompressionLevel Int
682+
-- ^ Use 'compressionLevel'. 'CompressionLevel' constructors will be hidden in version 0.7.
682683
deriving (Eq, Show, Typeable
683684
#if __GLASGOW_HASKELL__ >= 702
684685
, Generic
685686
#endif
686687
)
687688

688-
{-# DEPRECATED DefaultCompression "Use defaultCompression. CompressionLevel constructors will be hidden in version 0.7" #-}
689-
{-# DEPRECATED NoCompression "Use noCompression. CompressionLevel constructors will be hidden in version 0.7" #-}
690-
{-# DEPRECATED BestSpeed "Use bestSpeed. CompressionLevel constructors will be hidden in version 0.7" #-}
691-
{-# DEPRECATED BestCompression "Use bestCompression. CompressionLevel constructors will be hidden in version 0.7" #-}
689+
{-# DEPRECATED DefaultCompression "Use 'defaultCompression'. 'CompressionLevel' constructors will be hidden in version 0.7." #-}
690+
{-# DEPRECATED NoCompression "Use 'noCompression'. 'CompressionLevel' constructors will be hidden in version 0.7." #-}
691+
{-# DEPRECATED BestSpeed "Use 'bestSpeed'. 'CompressionLevel' constructors will be hidden in version 0.7." #-}
692+
{-# DEPRECATED BestCompression "Use 'bestCompression'. 'CompressionLevel' constructors will be hidden in version 0.7." #-}
692693
--FIXME: cannot deprecate constructor named the same as the type
693-
{- DEPRECATED CompressionLevel "Use compressionLevel. CompressionLevel constructors will be hidden in version 0.7" -}
694+
{- DEPRECATED CompressionLevel "Use 'compressionLevel'. 'CompressionLevel' constructors will be hidden in version 0.7." -}
694695

695696
-- | The default compression level is 6 (that is, biased towards higher
696697
-- compression at expense of speed).
@@ -738,6 +739,8 @@ fromCompressionLevel (CompressionLevel n)
738739
-- 'MemoryLevel'. See the 'MemoryLevel' for the details.
739740
--
740741
data WindowBits = WindowBits Int
742+
-- ^ Use 'windowBits'.
743+
-- 'WindowBits' constructors will be hidden in version 0.7.
741744
| DefaultWindowBits -- This constructor must be last to make
742745
-- the Ord instance work. The Ord instance
743746
-- is used by the tests.
@@ -749,9 +752,9 @@ data WindowBits = WindowBits Int
749752
#endif
750753
)
751754

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

756759
-- | The default 'WindowBits' is 15 which is also the maximum size.
757760
--
@@ -803,17 +806,18 @@ data MemoryLevel =
803806
| MinMemoryLevel
804807
| MaxMemoryLevel
805808
| MemoryLevel Int
809+
-- ^ Use 'memoryLevel'. 'MemoryLevel' constructors will be hidden in version 0.7.
806810
deriving (Eq, Show, Typeable
807811
#if __GLASGOW_HASKELL__ >= 702
808812
, Generic
809813
#endif
810814
)
811815

812-
{-# DEPRECATED DefaultMemoryLevel "Use defaultMemoryLevel. MemoryLevel constructors will be hidden in version 0.7" #-}
813-
{-# DEPRECATED MinMemoryLevel "Use minMemoryLevel. MemoryLevel constructors will be hidden in version 0.7" #-}
814-
{-# DEPRECATED MaxMemoryLevel "Use maxMemoryLevel. MemoryLevel constructors will be hidden in version 0.7" #-}
816+
{-# DEPRECATED DefaultMemoryLevel "Use 'defaultMemoryLevel'. 'MemoryLevel' constructors will be hidden in version 0.7." #-}
817+
{-# DEPRECATED MinMemoryLevel "Use 'minMemoryLevel'. 'MemoryLevel' constructors will be hidden in version 0.7." #-}
818+
{-# DEPRECATED MaxMemoryLevel "Use 'maxMemoryLevel'. 'MemoryLevel' constructors will be hidden in version 0.7." #-}
815819
--FIXME: cannot deprecate constructor named the same as the type
816-
{- DEPRECATED MemoryLevel "Use memoryLevel. MemoryLevel constructors will be hidden in version 0.7" -}
820+
{- DEPRECATED MemoryLevel "Use 'memoryLevel'. 'MemoryLevel' constructors will be hidden in version 0.7." -}
817821

818822
-- | The default memory level. (Equivalent to @'memoryLevel' 8@)
819823
--
@@ -867,11 +871,11 @@ data CompressionStrategy =
867871
#endif
868872
)
869873

870-
{-# DEPRECATED DefaultStrategy "Use defaultStrategy. CompressionStrategy constructors will be hidden in version 0.7" #-}
871-
{-# DEPRECATED Filtered "Use filteredStrategy. CompressionStrategy constructors will be hidden in version 0.7" #-}
872-
{-# DEPRECATED HuffmanOnly "Use huffmanOnlyStrategy. CompressionStrategy constructors will be hidden in version 0.7" #-}
873-
{-# DEPRECATED RLE "Use rleStrategy. CompressionStrategy constructors will be hidden in version 0.7" #-}
874-
{-# DEPRECATED Fixed "Use fixedStrategy. CompressionStrategy constructors will be hidden in version 0.7" #-}
874+
{-# DEPRECATED DefaultStrategy "Use 'defaultStrategy'. 'CompressionStrategy' constructors will be hidden in version 0.7." #-}
875+
{-# DEPRECATED Filtered "Use 'filteredStrategy'. 'CompressionStrategy' constructors will be hidden in version 0.7." #-}
876+
{-# DEPRECATED HuffmanOnly "Use 'huffmanOnlyStrategy'. 'CompressionStrategy' constructors will be hidden in version 0.7." #-}
877+
{-# DEPRECATED RLE "Use 'rleStrategy'. 'CompressionStrategy' constructors will be hidden in version 0.7." #-}
878+
{-# DEPRECATED Fixed "Use 'fixedStrategy'. 'CompressionStrategy' constructors will be hidden in version 0.7." #-}
875879

876880
-- | Use this default compression strategy for normal data.
877881
--
@@ -883,7 +887,7 @@ defaultStrategy = DefaultStrategy
883887
-- random distribution. In this case, the compression algorithm is tuned to
884888
-- compress them better. The effect of this strategy is to force more Huffman
885889
-- coding and less string matching; it is somewhat intermediate between
886-
-- 'defaultCompressionStrategy' and 'huffmanOnlyCompressionStrategy'.
890+
-- 'defaultStrategy' and 'huffmanOnlyStrategy'.
887891
--
888892
filteredStrategy :: CompressionStrategy
889893
filteredStrategy = Filtered

0 commit comments

Comments
 (0)