construct 0.2 → 0.2.0.1
raw patch · 4 files changed
+26/−10 lines, 4 filesdep ~rank2classesPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: rank2classes
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- README.md +8/−3
- construct.cabal +6/−4
- test/README.lhs +8/−3
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for construct +## 0.2.0.1 -- 2020-03-08++* Incremented the upper bound for the `rank2classes` dependency+ ## 0.2 -- 2020-01-27 * Updated for `base-4.13`
README.md view
@@ -42,7 +42,8 @@ BitMap{ width= byte, height= byte,- pixels= count (fromIntegral $ height this) (count (fromIntegral $ width this) byte)+ pixels= count (fromIntegral $ height this) $+ count (fromIntegral $ width this) byte }) ~~~ @@ -58,14 +59,18 @@ serialize the in-memory record form into the binary form: ~~~ {.haskell}--- | >>> serialize format BitMap{width= Identity 3, height= Identity 2, pixels= Identity [[7,8,9], [11,12,13]]}+-- |+-- >>> let record = BitMap{width= pure 3, height= pure 2, pixels= pure [[7,8,9], [11,12,13]]}+-- >>> serialize format record -- Just "BMP\ETX\STX\a\b\t\v\f\r" ~~~ and to parse the serialized binary form back into the record structure: ~~~ {.haskell}--- | >>> completeResults $ feedEof $ feed (ASCII.pack "BMP" <> ByteString.pack [3, 2, 7, 8, 9, 11, 12, 13]) $ parse format+-- |+-- >>> let bytes = ASCII.pack "BMP\ETX\STX\a\b\t\v\f\r"+-- >>> completeResults $ feedEof $ feed bytes $ parse format -- [(BitMap {width = Identity 3, height = Identity 2, pixels = Identity [[7,8,9],[11,12,13]]},"")] ~~~
construct.cabal view
@@ -1,6 +1,6 @@ cabal-version: >=1.10 name: construct-version: 0.2+version: 0.2.0.1 synopsis: Haskell version of the Construct library for easy specification of file formats description: A Haskell version of the <https://construct.readthedocs.io/en/latest/intro.html Construct> library for Python. A@@ -36,7 +36,7 @@ parsers >= 0.11 && < 0.13, attoparsec >= 0.12 && < 0.14, cereal >= 0.5 && < 0.6,- rank2classes >= 1 && < 1.4+ rank2classes >= 1 && < 1.5 default-language: Haskell2010 ghc-options: -Wall @@ -48,7 +48,7 @@ other-modules: README ghc-options: -threaded -pgmL markdown-unlit build-depends: base, construct,- bytestring >= 0.10 && < 0.11, incremental-parser >= 0.4 && < 0.5, rank2classes >= 1.0.2 && < 1.4,+ bytestring >= 0.10 && < 0.11, incremental-parser >= 0.4 && < 0.5, rank2classes >= 1.0.2 && < 1.5, doctest >= 0.8 build-tool-depends: markdown-unlit:markdown-unlit >= 0.5 && < 0.6 x-doctest-options: -XTypeApplications@@ -57,11 +57,13 @@ type: exitcode-stdio-1.0 hs-source-dirs: test build-depends: base >=4.9 && < 5, construct,- bytestring < 0.11, text < 1.3, cereal, rank2classes >= 1.0.2 && < 1.4,+ bytestring < 0.11, text < 1.3, cereal, rank2classes >= 1.0.2 && < 1.5, monoid-subclasses >= 1.0 && < 1.1, incremental-parser < 0.5, attoparsec >= 0.12 && < 0.14, directory < 2, filepath < 1.5, tasty >= 0.7, tasty-hunit main-is: Test.hs other-modules: MBR, TAR, URI, WMF, OrphanInstances default-language: Haskell2010++ -- workaround for https://gitlab.haskell.org/ghc/ghc/issues/17744 ghc-options: -O0
test/README.lhs view
@@ -42,7 +42,8 @@ BitMap{ width= byte, height= byte,- pixels= count (fromIntegral $ height this) (count (fromIntegral $ width this) byte)+ pixels= count (fromIntegral $ height this) $+ count (fromIntegral $ width this) byte }) ~~~ @@ -58,14 +59,18 @@ serialize the in-memory record form into the binary form: ~~~ {.haskell}--- | >>> serialize format BitMap{width= Identity 3, height= Identity 2, pixels= Identity [[7,8,9], [11,12,13]]}+-- |+-- >>> let record = BitMap{width= pure 3, height= pure 2, pixels= pure [[7,8,9], [11,12,13]]}+-- >>> serialize format record -- Just "BMP\ETX\STX\a\b\t\v\f\r" ~~~ and to parse the serialized binary form back into the record structure: ~~~ {.haskell}--- | >>> completeResults $ feedEof $ feed (ASCII.pack "BMP" <> ByteString.pack [3, 2, 7, 8, 9, 11, 12, 13]) $ parse format+-- |+-- >>> let bytes = ASCII.pack "BMP\ETX\STX\a\b\t\v\f\r"+-- >>> completeResults $ feedEof $ feed bytes $ parse format -- [(BitMap {width = Identity 3, height = Identity 2, pixels = Identity [[7,8,9],[11,12,13]]},"")] ~~~