HORIZON HASKELLDocslts/ghc-10.0.xc7d136e2026-10-12Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · c7d136e · 2026-10-12

Package0.1.6.1Data

text-short

Memory-efficient representation of Unicode text strings

Modules

3 modules

Description

This package provides the ShortText type which is suitable for keeping many short strings in memory. This is similiar to how ShortByteString relates to ByteString.

The main difference between Text and ShortText is that ShortText doesn't support zero-copy slicing (thereby saving 2 words), and, compared to text-1.*, that it uses UTF-8 instead of UTF-16 internally. Consequently, the memory footprint of a (boxed) ShortText value is 4 words (2 words when unboxed) plus the length of the UTF-8 encoded payload.

Depends on

7 packages

Used by in this set · 1