Skip to content

Commit

Permalink
Derive Show EntryDescription
Browse files Browse the repository at this point in the history
  • Loading branch information
nh2 authored and mrkkrp committed Jun 19, 2024
1 parent f0abe7c commit 9fbf3f7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 17 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Codec/Archive/Zip/Internal/Type.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 0 additions & 16 deletions tests/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<zip archive>"

Expand Down

0 comments on commit 9fbf3f7

Please sign in to comment.