Skip to content

Commit

Permalink
Bump resolver to lts-19.7
Browse files Browse the repository at this point in the history
Update discussion of **text**'s UTF-16 problem, closes #119.
  • Loading branch information
istathar committed May 23, 2022
1 parent e2b31c7 commit 0174d8f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
10 changes: 6 additions & 4 deletions core-text/lib/Core/Text/Rope.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ sequence requires.
The second way is through the opaque @Text@ type of "Data.Text" from the
__text__ package, which is well tuned and high-performing but suffers from the
same design; it is likewise backed by arrays. Rather surprisingly, the storage
backing Text objects are encoded in UTF-16, meaning every time you want to
same design; it is likewise backed by arrays. (Historically, the storage
backing Text objects was encoded in UTF-16, meaning every time you wanted to
work with unicode characters that came in from /anywhere/ else and which
inevitably are UTF-8 encoded you have to convert to UTF-16 and copy into a new
array, wasting time and memory.
inevitably were UTF-8 encoded they had to be converted to UTF-16 and copied
into a further new array! Fortunately Haskell has recently adopted a UTF-8
backed @Text@ type, reducing this overhead. The challenge of appending pinned
allocations remains, however.)
In this package we introduce 'Rope', a text type backed by the 2-3
'Data.FingerTree.FingerTree' data structure from the __fingertree__ package.
Expand Down
9 changes: 2 additions & 7 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: lts-18.28
resolver: lts-19.7
packages:
- ./core-data
- ./core-text
Expand All @@ -7,9 +7,4 @@ packages:
- ./core-webserver-servant
- ./core-webserver-warp
- .
extra-deps:
- hashable-1.3.5.0
- semialign-1.2
- servant-0.19
- servant-server-0.19.1
- time-compat-1.9.6.1
extra-deps: []

0 comments on commit 0174d8f

Please sign in to comment.