Skip to content

Commit 2c73b5a

Browse files
committed
Add more derived instances to various types
1 parent 23c8e3e commit 2c73b5a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Codec/Compression/Zlib/Stream.hsc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ fromFlush Finish = #{const Z_FINISH}
543543
-- variations.
544544
--
545545
data Format = GZip | Zlib | Raw | GZipOrZlib
546-
deriving Eq
546+
deriving (Eq, Ord, Enum, Bounded, Show, Typeable, Generic)
547547

548548
{-# DEPRECATED GZip "Use gzipFormat. Format constructors will be hidden in version 0.7" #-}
549549
{-# DEPRECATED Zlib "Use zlibFormat. Format constructors will be hidden in version 0.7" #-}
@@ -588,6 +588,7 @@ formatSupportsDictionary _ = False
588588
-- | The compression method
589589
--
590590
data Method = Deflated
591+
deriving (Eq, Ord, Enum, Bounded, Show, Typeable, Generic)
591592

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

@@ -611,6 +612,7 @@ data CompressionLevel =
611612
| BestSpeed
612613
| BestCompression
613614
| CompressionLevel Int
615+
deriving (Eq, Show, Typeable, Generic)
614616

615617
{-# DEPRECATED DefaultCompression "Use defaultCompression. CompressionLevel constructors will be hidden in version 0.7" #-}
616618
{-# DEPRECATED NoCompression "Use noCompression. CompressionLevel constructors will be hidden in version 0.7" #-}
@@ -670,6 +672,7 @@ data WindowBits = WindowBits Int
670672
-- is defined with and used by the tests.
671673
-- It makse sense because the default value
672674
-- is is also the max value at 15.
675+
deriving (Eq, Show, Typeable, Generic)
673676

674677
{-# DEPRECATED DefaultWindowBits "Use defaultWindowBits. WindowBits constructors will be hidden in version 0.7" #-}
675678
--FIXME: cannot deprecate constructor named the same as the type
@@ -725,6 +728,7 @@ data MemoryLevel =
725728
| MinMemoryLevel
726729
| MaxMemoryLevel
727730
| MemoryLevel Int
731+
deriving (Eq, Show, Typeable, Generic)
728732

729733
{-# DEPRECATED DefaultMemoryLevel "Use defaultMemoryLevel. MemoryLevel constructors will be hidden in version 0.7" #-}
730734
{-# DEPRECATED MinMemoryLevel "Use minMemoryLevel. MemoryLevel constructors will be hidden in version 0.7" #-}
@@ -774,6 +778,7 @@ data CompressionStrategy =
774778
DefaultStrategy
775779
| Filtered
776780
| HuffmanOnly
781+
deriving (Eq, Ord, Enum, Bounded, Show, Typeable, Generic)
777782

778783
{-
779784
-- -- only available in zlib 1.2 and later, uncomment if you need it.

0 commit comments

Comments
 (0)