Skip to content

Commit 2e76468

Browse files
committed
Update changelog and @since annotations
1 parent b4d7ce5 commit 2e76468

File tree

4 files changed

+39
-0
lines changed

4 files changed

+39
-0
lines changed

changelog.md

+30
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,37 @@
11
### 2.1.2
22

3+
* [Update case mappings for Unicode 16.0](https://github.com/haskell/text/pull/618)
4+
35
* [Add type synonym for lazy builders. Deprecated `StrictBuilder` for `StrictTextBuilder`](https://github.com/haskell/text/pull/581)
46

7+
* [Add `initsNE` and `tailsNE`](https://github.com/haskell/text/pull/558)
8+
9+
* [Add `foldlM'`](https://github.com/haskell/text/pull/543)
10+
11+
* [Add `Data.Text.Foreign.peekCString`](https://github.com/haskell/text/pull/599)
12+
13+
* [Add `Data.Text.show` and `Data.Text.Lazy.show`](https://github.com/haskell/text/pull/608)
14+
15+
* [Add pattern synonyms `Empty`, `(:<)`, and `(:>)`](https://github.com/haskell/text/pull/619)
16+
17+
* [Improve precision of `Data.Text.Read.rational`](https://github.com/haskell/text/pull/565)
18+
19+
* [`Data.Text.IO.Utf8`: use `B.putStrLn` instead of `B.putStr t >> B.putStr "\n"`](https://github.com/haskell/text/pull/579)
20+
21+
* [`Data.Text.IO` and `Data.Text.Lazy.IO`: Make `putStrLn` more atomic with line or block buffering](https://github.com/haskell/text/pull/600)
22+
23+
* [Integrate UTF-8 `hPutStr` to standard `hPutStr`](https://github.com/haskell/text/pull/589)
24+
25+
* [Serialise `Text` without going through `ByteString`](https://github.com/haskell/text/pull/617)
26+
27+
* [Make `splitAt` strict in its first argument, even if input is empty](https://github.com/haskell/text/pull/575)
28+
29+
* [Improve lazy performance of `Data.Text.Lazy.inits`](https://github.com/haskell/text/pull/572)
30+
31+
* [Implement `Data.Text.unpack` and `Data.Text.toTitle` directly, without streaming](https://github.com/haskell/text/pull/611)
32+
33+
* [Make `fromString` `INLINEABLE` instead of `INLINE`](https://github.com/haskell/text/pull/571) to reduce the size of generated code.
34+
535
### 2.1.1
636

737
* Add pure Haskell implementations as an alternative to C-based ones,

src/Data/Text.hs

+4
Original file line numberDiff line numberDiff line change
@@ -1041,6 +1041,8 @@ foldl1' f t = S.foldl1' f (stream t)
10411041
{-# INLINE foldl1' #-}
10421042

10431043
-- | /O(n)/ A monadic version of 'foldl''.
1044+
--
1045+
-- @since 2.1.2
10441046
foldlM' :: Monad m => (a -> Char -> m a) -> a -> Text -> m a
10451047
foldlM' f z t = S.foldlM' f z (stream t)
10461048
{-# INLINE foldlM' #-}
@@ -2096,6 +2098,8 @@ overflowError :: HasCallStack => String -> a
20962098
overflowError fun = P.error $ "Data.Text." ++ fun ++ ": size overflow"
20972099

20982100
-- | Convert a value to 'Text'.
2101+
--
2102+
-- @since 2.1.2
20992103
show :: Show a => a -> Text
21002104
show = pack . P.show
21012105

src/Data/Text/Internal/Lazy.hs

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ import qualified Data.Text as T
5151

5252
data Text = Empty
5353
-- ^ Empty text.
54+
--
55+
-- @since 2.1.2
5456
| Chunk {-# UNPACK #-} !T.Text Text
5557
-- ^ Chunks must be non-empty, this invariant is not checked.
5658
deriving (Typeable)

src/Data/Text/Lazy.hs

+3
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,7 @@ foldl1' f t = S.foldl1' f (stream t)
853853

854854
-- | /O(n)/ A monadic version of 'foldl''.
855855
--
856+
-- @since 2.1.2
856857
foldlM' :: Monad m => (a -> Char -> m a) -> a -> Text -> m a
857858
foldlM' f z t = S.foldlM' f z (stream t)
858859
{-# INLINE foldlM' #-}
@@ -1828,6 +1829,8 @@ zipWith f t1 t2 = unstream (S.zipWith g (stream t1) (stream t2))
18281829
{-# INLINE [0] zipWith #-}
18291830

18301831
-- | Convert a value to lazy 'Text'.
1832+
--
1833+
-- @since 2.1.2
18311834
show :: Show a => a -> Text
18321835
show = pack . P.show
18331836

0 commit comments

Comments
 (0)