From a66a3fb4a3ea1b49e7dc61e03cd071782b047835 Mon Sep 17 00:00:00 2001 From: Matthew Craven Date: Sat, 13 Sep 2025 19:45:53 -0400 Subject: [PATCH 1/3] WIP: Changelog updates since 0.12.2.0 --- Changelog.md | 24 ++++++++++++++++++++++-- Data/ByteString/Short/Internal.hs | 3 +++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/Changelog.md b/Changelog.md index 5aae20e1..3c9e7148 100644 --- a/Changelog.md +++ b/Changelog.md @@ -5,15 +5,35 @@ * This allows utilities like `syb:Data.Generics.Text.gread` to be meaningfully used at these types containing `ByteString`s. * [`fromListN` in `instance IsList ByteString` truncates input list if it's longer than the size hint](https://github.com/haskell/bytestring/pull/672) + + +[0.12.3.0] — TBA 2025 - [0.12.2.0] — October 2024 diff --git a/Data/ByteString/Short/Internal.hs b/Data/ByteString/Short/Internal.hs index 21dc2587..6c96cc98 100644 --- a/Data/ByteString/Short/Internal.hs +++ b/Data/ByteString/Short/Internal.hs @@ -455,6 +455,8 @@ toShortIO (BS fptr len) = do -- | A simple wrapper around 'fromShort' that wraps the strict 'ByteString' as -- a one-chunk 'LBS.LazyByteString'. +-- +-- @since 0.12.3.0 lazyFromShort :: ShortByteString -> LBS.ByteString lazyFromShort = LBS.fromStrict . fromShort @@ -464,6 +466,7 @@ lazyFromShort = LBS.fromStrict . fromShort -- used only with sufficiently short lazy ByteStrings. The entire lazy -- ByteString is brought into memory before a copy is made. -- +-- @since 0.12.3.0 lazyToShort :: LBS.ByteString -> ShortByteString lazyToShort LBS.Empty = empty lazyToShort lbs = unsafeDupablePerformIO $ do From 7316e4c6de23b9898ff2572a9b302e8a664513c5 Mon Sep 17 00:00:00 2001 From: Matthew Craven Date: Sat, 13 Sep 2025 20:22:41 -0400 Subject: [PATCH 2/3] Add missing link --- Changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 3c9e7148..a0d67f76 100644 --- a/Changelog.md +++ b/Changelog.md @@ -22,7 +22,7 @@ * [Fix build in the presence of sketchy upstream CPP that triggers `-Wundef`](https://github.com/haskell/bytestring/pull/711) * (See [#665](https://github.com/haskell/bytestring/issues/665) and [#709](https://github.com/haskell/bytestring/issues/709).) * API additions and behavior changes: - * `Data.ByteString.Short` now provides `lazyToShort` and `lazyFromShort`. + * [`Data.ByteString.Short` now provides `lazyToShort` and `lazyFromShort`.](https://github.com/haskell/bytestring/pull/711) * Deprecations: * Performance improvements: * [Use only unsigned ints in the C itoa functions](https://github.com/haskell/bytestring/pull/702) From df09bf88efb0e20977021a7244cdbb1428c01557 Mon Sep 17 00:00:00 2001 From: Matthew Craven Date: Sat, 13 Sep 2025 20:24:02 -0400 Subject: [PATCH 3/3] Fix link --- Changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index a0d67f76..15abe43d 100644 --- a/Changelog.md +++ b/Changelog.md @@ -22,7 +22,7 @@ * [Fix build in the presence of sketchy upstream CPP that triggers `-Wundef`](https://github.com/haskell/bytestring/pull/711) * (See [#665](https://github.com/haskell/bytestring/issues/665) and [#709](https://github.com/haskell/bytestring/issues/709).) * API additions and behavior changes: - * [`Data.ByteString.Short` now provides `lazyToShort` and `lazyFromShort`.](https://github.com/haskell/bytestring/pull/711) + * [`Data.ByteString.Short` now provides `lazyToShort` and `lazyFromShort`.](https://github.com/haskell/bytestring/pull/619) * Deprecations: * Performance improvements: * [Use only unsigned ints in the C itoa functions](https://github.com/haskell/bytestring/pull/702)