changelog.md 9.24 KB
Newer Older
Bodigrim's avatar
Bodigrim committed
1
### 2.0
2

Bodigrim's avatar
Bodigrim committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
* [Switch internal representation of text from UTF-16 to UTF-8](https://github.com/haskell/text/pull/365):
  * Functions in `Data.Text.Array` now operate over arrays of `Word8` instead of `Word16`.
  * Rename constructors of `Array` and `MArray` to `ByteArray` and `MutableByteArray`.
  * Rename functions and types in `Data.Text.Foreign` to reflect switch
    from `Word16` to `Word8`.
  * Rename slicing functions in `Data.Text.Unsafe` to reflect switch
    from `Word16` to `Word8`.
  * Rename `Data.Text.Internal.Unsafe.Char.unsafeChr` to `unsafeChr16`.
  * Change semantics and order of arguments of `Data.Text.Array.copyI`:
    pass length, not end offset.
  * Extend `Data.Text.Internal.Encoding.Utf8` to provide more UTF-8 related routines.
  * Extend interface of `Data.Text.Array` with more utility functions.
  * Add `instance Show Data.Text.Unsafe.Iter`.
  * Add `Data.Text.measureOff`.
  * Extend `Data.Text.Unsafe` with `iterArray` and `reverseIterArray`.
  * Export `Data.Text.Internal.Lazy.equal`.
  * Export `Data.Text.Internal.append`.
  * Add `Data.Text.Internal.Private.spanAscii_`.
  * Replacement characters in `decodeUtf8With` are no longer limited to Basic Multilingual Plane.
Bodigrim's avatar
Bodigrim committed
22
23
24
25
26
* [Disable implicit fusion rules](https://github.com/haskell/text/pull/348)
* [Add `Data.Text.Encoding.decodeUtf8Lenient`](https://github.com/haskell/text/pull/342)
* [Remove `Data.Text.Internal.Unsafe.Shift`](https://github.com/haskell/text/pull/343)
* [Remove `Data.Text.Internal.Functions`](https://github.com/haskell/text/pull/354)
* [Bring type of `Data.Text.Unsafe.reverseIter` in line with `iter`](https://github.com/haskell/text/pull/355)
Bodigrim's avatar
Bodigrim committed
27
28
* [Add `instance Bounded FPFormat`](https://github.com/haskell/text/pull/355)
* [Add HasCallStack to partial functions](https://github.com/haskell/text/pull/388)
Bodigrim's avatar
Bodigrim committed
29
30
31
32
33
34
35
36
37
38
39

### 1.2.5.0

* [Support sized primitives from GHC 9.2](https://github.com/haskell/text/pull/305)
* [Allow `template-haskell-2.18.0.0`](https://github.com/haskell/text/pull/320)
* [Add `elem :: Char -> Text -> Bool` to `Data.Text` and `Data.Text.Lazy`](https://github.com/haskell/text/pull/274)
* [Replace surrogate code points in `Data.Text.Internal.Builder.{singleton,fromString}`](https://github.com/haskell/text/pull/281)
* [Use `unsafeWithForeignPtr` when available](https://github.com/haskell/text/pull/325)
* [Use vectorized CPU instructions for decoding and encoding](https://github.com/haskell/text/pull/302)
* [Regenerate case mapping in accordance to Unicode 13.0](https://github.com/haskell/text/pull/334)
* [Fix UTF-8 decoding of lazy bytestrings](https://github.com/haskell/text/pull/333)
40

41
42
43
### 1.2.4.1

* Support `template-haskell-2.17.0.0`
Oleg Grenrus's avatar
Oleg Grenrus committed
44
45
* Support `bytestring-0.11`
* Add `take . drop` related RULE
46

47
### 1.2.4.0
48

49
* Add TH `Lift` instances for `Data.Text.Text` and `Data.Text.Lazy.Text` (gh-232)
50
51
52
53

* Update Haddock documentation to better reflect fusion eligibility; improve fusion
  rules for `takeWhileEnd` and `length` (gh-241, ghc-202)

54
55
* Optimise `Data.Text.replicate` from `O(n)` to `O(log n)` (gh-209)

56
* Support `base-4.13.0.0`
57

58
### 1.2.3.1
59
60
61
62

* Make `decodeUtf8With` fail explicitly for unsupported non-BMP
  replacement characters instead silent undefined behaviour (gh-213)

63
64
65
* Fix termination condition for file reads via `Data.Text.IO`
  operations (gh-223)

66
67
68
69
70
71
* A serious correctness issue affecting uses of `take` and `drop` with
  negative counts has been fixed (gh-227)

* A bug in the case-mapping functions resulting in unreasonably large
  allocations with large arguments has been fixed (gh-221)

72
### 1.2.3.0
73

74
75
* Spec compliance: `toCaseFold` now follows the Unicode 9.0 spec
  (updated from 8.0).
bos's avatar
bos committed
76

77
* Bug fix: the lazy `takeWhileEnd` function violated the
78
79
  [lazy text invariant](https://github.com/bos/text/blob/1.2.3.0/Data/Text/Internal/Lazy.hs#L51)
  (gh-184).
80

81
82
* Bug fix: Fixed usage of size hints causing incorrect behavior (gh-197).

83
* New function: `unsnoc` (gh-173).
84
85
86

* Reduce memory overhead in `encodeUTF8` (gh-194).

87
88
89
90
* Improve UTF-8 decoder error-recovery (gh-182).

* Minor documentation improvements (`@since` annotations, more
  examples, clarifications).
91

92
#### 1.2.2.2
bos's avatar
bos committed
93

bos's avatar
bos committed
94
* The `toTitle` function now correctly handles letters that
bos's avatar
bos committed
95
  immediately follow punctuation. Before, `"there's"` would turn into
bos's avatar
bos committed
96
97
98
99
100
101
102
103
104
  `"There'S"`. Now, it becomes `"There's"`.

* The implementation of unstreaming is faster, resulting in operations
  such as `map` and `intersperse` speeding up by up to 30%, with
  smaller code generated.

* The optimised length comparison function is now more likely to be
  used after some rewrite rule tweaking.

bos's avatar
bos committed
105
106
107
108
* Bug fix: an off-by-one bug in `takeEnd` is fixed.

* Bug fix: a logic error in `takeWord16` is fixed.

109
#### 1.2.2.1
bos's avatar
bos committed
110
111
112
113
114

* The switch to `integer-pure` in 1.2.2.0 was apparently mistaken.
  The build flag has been renamed accordingly.  Your army of diligent
  maintainers apologizes for the churn.

bos's avatar
bos committed
115
* Spec compliance: `toCaseFold` now follows the Unicode 8.0 spec
bos's avatar
bos committed
116
117
118
119
  (updated from 7.0)

* An STG lint error has been fixed

120
### 1.2.2.0
bos's avatar
bos committed
121

122
123
124
125
* The `integer-simple` package, upon which this package optionally
  depended, has been replaced with `integer-pure`.  The build flag has
  been renamed accordingly.

bos's avatar
bos committed
126
127
128
129
130
131
132
133
134
135
* Bug fix: For the `Binary` instance, If UTF-8 decoding fails during a
  `get`, the error is propagated via `fail` instead of an uncatchable
  crash.

* New function: `takeWhileEnd`

* New instances for the `Text` types:
    * if `base` >= 4.7: `PrintfArg`
    * if `base` >= 4.9: `Semigroup`

136
#### 1.2.1.3
Ben Gamari's avatar
Ben Gamari committed
137

bos's avatar
bos committed
138
* Bug fix: As it turns out, moving the literal rewrite rules to simplifier
Ben Gamari's avatar
Ben Gamari committed
139
140
141
142
143
  phase 2 does not prevent competition with the `unpack` rule, which is
  also active in this phase. Unfortunately this was hidden due to a silly
  test environment mistake. Moving literal rules back to phase 1 finally
  fixes GHC Trac #10528 correctly.

144
#### 1.2.1.2
Ben Gamari's avatar
Ben Gamari committed
145
146
147
148
149
150
151

* Bug fix: Run literal rewrite rules in simplifier phase 2.
  The behavior of the simplifier changed in GHC 7.10.2,
  causing these rules to fail to fire, leading to poor code generation
  and long compilation times. See
  [GHC Trac #10528](https://ghc.haskell.org/trac/ghc/ticket/10528).

152
#### 1.2.1.1
bos's avatar
bos committed
153
154
155

* Expose unpackCString#, which you should never use.

156
### 1.2.1.0
bos's avatar
bos committed
157
158
159
160
161

* Added Binary instances for both Text types. (If you have previously
  been using the text-binary package to get a Binary instance, it is
  now obsolete.)

162
#### 1.2.0.6
bos's avatar
bos committed
163
164
165

* Fixed a space leak in UTF-8 decoding

166
#### 1.2.0.5
bos's avatar
bos committed
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185

* Feature parity: repeat, cycle, iterate are now implemented for lazy
  Text, and the Data instance is more complete

* Build speed: an inliner space explosion has been fixed with toCaseFold

* Bug fix: encoding Int to a Builder would infinite-loop if the
  integer-simple package was used

* Deprecation: OnEncodeError and EncodeError are deprecated, as they
  are never used

* Internals: some types that are used internally in fusion-related
  functions have moved around, been renamed, or been deleted (we don't
  bump the major version if .Internal modules change)

* Spec compliance: toCaseFold now follows the Unicode 7.0 spec
  (updated from 6.3)

186
#### 1.2.0.4
bos's avatar
bos committed
187
188
189

* Fixed an incompatibility with base < 4.5

190
#### 1.2.0.3
bos's avatar
bos committed
191
192
193
194

* Update formatRealFloat to correspond to the definition in versions
  of base newer than 4.5 (https://github.com/bos/text/issues/105)

195
#### 1.2.0.2
bos's avatar
bos committed
196
197
198
199

* Bumped lower bound on deepseq to 1.4 for compatibility with the
  upcoming GHC 7.10

200
#### 1.2.0.1
bos's avatar
bos committed
201
202
203
204

* Fixed a buffer overflow in rendering of large Integers
  (https://github.com/bos/text/issues/99)

205
## 1.2.0.0
bos's avatar
bos committed
206

bos's avatar
bos committed
207
208
209
210
211
212
213
214
215
* Fixed an integer overflow in the replace function
  (https://github.com/bos/text/issues/81)

* Fixed a hang in lazy decodeUtf8With
  (https://github.com/bos/text/issues/87)

* Reduced codegen bloat caused by use of empty and single-character
  literals

bos's avatar
bos committed
216
217
* Added an instance of IsList for GHC 7.8 and above

218
### 1.1.1.0
bos's avatar
bos committed
219
220
221
222
223
224
225
226
227

* The Data.Data instance now allows gunfold to work, via a virtual
  pack constructor

* dropEnd, takeEnd: new functions

* Comparing the length of a Text against a number can now
  short-circuit in more cases

228
#### 1.1.0.1
bos's avatar
bos committed
229
230
231
232

* streamDecodeUtf8: fixed gh-70, did not return all unconsumed bytes
  in single-byte chunks

233
## 1.1.0.0
bos's avatar
bos committed
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251

* encodeUtf8: Performance is improved by up to 4x.

* encodeUtf8Builder, encodeUtf8BuilderEscaped: new functions,
  available only if bytestring >= 0.10.4.0 is installed, that allow
  very fast and flexible encoding of a Text value to a bytestring
  Builder.

  As an example of the performance gain to be had, the
  encodeUtf8BuilderEscaped function helps to double the speed of JSON
  encoding in the latest version of aeson! (Note: if all you need is a
  plain ByteString, encodeUtf8 is still the faster way to go.)

* All of the internal module hierarchy is now publicly exposed.  If a
  module is in the .Internal hierarchy, or is documented as internal,
  use at your own risk - there are no API stability guarantees for
  internal modules!

252
#### 1.0.0.1
bos's avatar
bos committed
253
254
255
256

* decodeUtf8: Fixed a regression that caused us to incorrectly
  identify truncated UTF-8 as valid (gh-61)

257
# 1.0.0.0
bos's avatar
bos committed
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272

* Added support for Unicode 6.3.0 to case conversion functions

* New function toTitle converts words in a string to title case

* New functions peekCStringLen and withCStringLen simplify
  interoperability with C functionns

* Added support for decoding UTF-8 in stream-friendly fashion

* Fixed a bug in mapAccumL

* Added trusted Haskell support

* Removed support for GHC 6.10 (released in 2008) and older