You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to have a function to convert from Chunks to utf8-text in the form of either new text or ShortText as otherwise one has to pass through bytestring.
The text was updated successfully, but these errors were encountered:
Chunks are not generally byte sequences of utf-8-encoded text, but in many cases, it's easy for the user to enforce this invariant. I'd take a PR adding a Data.Bytes.Chunks.Unsafe module with a toShortText function and the precondition documented. A similar toText function would be fine, but I cannot require text-2.x as a dependency yet since most of my own projects cannot use text-2.x yet. If you add text >= 1.2 and make the existence of toText conditional on the version of text (omitting it when text < 2.0), that would be fine.
It would be nice to have a function to convert from
Chunks
to utf8-text in the form of either newtext
orShortText
as otherwise one has to pass throughbytestring
.The text was updated successfully, but these errors were encountered: