fmt 0.6.1.1 → 0.6.1.2
raw patch · 3 files changed
+25/−7 lines, 3 filesdep +QuickCheckPVP ok
version bump matches the API change (PVP)
Dependencies added: QuickCheck
API changes (from Hackage documentation)
Files
- CHANGELOG.md +5/−0
- fmt.cabal +10/−3
- lib/Fmt/Internal/Formatters.hs +10/−4
CHANGELOG.md view
@@ -1,3 +1,8 @@+# 0.6.1.2++* Bumped the `hspec` upper bound.+* Fixed doctests.+ # 0.6.1.1 * Added `HasCallStack` to partial functions.
fmt.cabal view
@@ -1,5 +1,5 @@ name: fmt-version: 0.6.1.1+version: 0.6.1.2 synopsis: A new formatting library description: A new formatting library that tries to be simple to understand while still@@ -46,7 +46,12 @@ maintainer: yom@artyom.me -- copyright: category: Text-tested-with: GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.2+tested-with:+ GHC == 7.10.3+ GHC == 8.0.2+ GHC == 8.2.2+ GHC == 8.4.4+ GHC == 8.6.4 build-type: Simple extra-source-files: CHANGELOG.md tests/doctest-config.json@@ -94,7 +99,7 @@ , call-stack , containers , fmt- , hspec >= 2.2 && < 2.6+ , hspec >= 2.2 && < 2.8 , neat-interpolation , text , vector@@ -112,6 +117,8 @@ main-is: doctests.hs build-depends: base >=4.6 && <5 , doctest+ , QuickCheck+ build-tool-depends: doctest-discover:doctest-discover if impl(ghc < 8.0) buildable: False
lib/Fmt/Internal/Formatters.hs view
@@ -32,6 +32,13 @@ ----------------------------------------------------------------------------+-- Doctest setup+----------------------------------------------------------------------------++-- $setup+-- >>> import Fmt++---------------------------------------------------------------------------- -- Text formatters ---------------------------------------------------------------------------- @@ -127,11 +134,10 @@ {- | A version of 'listF' that lets you supply your own building function for list elements. -For instance, to format a list of lists you'd have to do this (since there's-no 'Buildable' instance for lists):+For instance, to format a list of numbers as hex: ->>> listF' listF [[1,2,3],[4,5,6]]-"[[1, 2, 3], [4, 5, 6]]"+>>> listF' hexF [1234, 5678]+"[4d2, 162e]" -} listF' :: (Foldable f) => (a -> Builder) -> f a -> Builder listF' fbuild xs = mconcat $