diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b204d1..4b76766 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ * Exposed `Codec.Archive.Zip.Internal` and `Codec.Archive.Zip.Internal.Type` modules. [PR 115](https://github.com/mrkkrp/zip/pull/115). +* Derived `Show` for `EntryDescription`. [PR + 115](https://github.com/mrkkrp/zip/pull/115). + ## Zip 2.0.1 * Fixed corruption of large entries when zip64 is used. [Issue diff --git a/Codec/Archive/Zip/Internal/Type.hs b/Codec/Archive/Zip/Internal/Type.hs index 3486f5a..87f59e0 100644 --- a/Codec/Archive/Zip/Internal/Type.hs +++ b/Codec/Archive/Zip/Internal/Type.hs @@ -170,7 +170,7 @@ data EntryDescription = EntryDescription -- @since 1.2.0 edExternalFileAttrs :: Word32 } - deriving (Eq, Typeable) + deriving (Eq, Typeable, Show) -- | The supported compression methods. data CompressionMethod diff --git a/tests/Main.hs b/tests/Main.hs index 141eeca..6a56dee 100644 --- a/tests/Main.hs +++ b/tests/Main.hs @@ -204,22 +204,6 @@ binASCII = LB.toStrict . LB.toLazyByteString <$> go (1, return mempty) ] -instance Show EntryDescription where - show ed = - "{ edCompression = " - ++ show (edCompression ed) - ++ "\n, edModTime = " - ++ show (edModTime ed) - ++ "\n, edUncompressedSize = " - ++ show (edUncompressedSize ed) - ++ "\n, edComment = " - ++ show (edComment ed) - ++ "\n, edExtraField = " - ++ show (edExtraField ed) - ++ "\n, edExtFileAttr = " - ++ show (edExternalFileAttrs ed) - ++ " }" - instance Show (ZipArchive a) where show = const ""