packages feed

sayable 1.2.1.0 → 1.2.2.0

raw patch · 3 files changed

+18/−2 lines, 3 filesdep ~prettyprinter

Dependency ranges changed: prettyprinter

Files

CHANGELOG.md view
@@ -1,5 +1,11 @@ # Revision history for sayable +## 1.2.2.0 -- 2023-10-18++* Added `sez_` helper, which is the same as `sez` but it uses an unlimited output+  width to ensure the result is not wrapped (unless the output explicitly+  specifies newlines).+ ## 1.2.1.0 -- 2023-10-18  * Added default `Sayable` instances for `Float` and `Double`.
Text/Sayable.hs view
@@ -362,6 +362,7 @@   , SayableAnn(SayableAnn)     -- * Simple String Extraction   , sez+  , sez_   ) where @@ -380,6 +381,7 @@ import           Numeric.Natural ( Natural ) import           Prettyprinter ( (<+>) ) import qualified Prettyprinter as PP+import qualified Prettyprinter.Render.String as PPS   -- | The main class of things that can be passed to 'sayable'.  Arguments@@ -805,3 +807,11 @@  sez :: forall saytag a . Sayable saytag a => a -> String sez = show . saying . sayable @saytag++-- | This is a convenience function similar to the 'sez' helper, but specifies an+-- unlimited width so there is no wrapping.++sez_ :: forall saytag a . Sayable saytag a => a -> String+sez_ = PPS.renderString+       . PP.layoutPretty (PP.LayoutOptions PP.Unbounded)+       . saying . sayable @saytag
sayable.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               sayable-version:            1.2.1.0+version:            1.2.2.0 synopsis: Data structures, classes and operators for constructing context-adjusted pretty output description:    .@@ -48,7 +48,7 @@                     , exceptions                     , bytestring                     , text-                    , prettyprinter+                    , prettyprinter >= 1.7 && < 1.8  test-suite sayableTests     import:           bldspec