# text-short

> Memory-efficient ShortText type for many short Unicode strings in Haskell

Source: https://talira.ai/catalog/text-short-tvzh5wnv
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / text / strings](https://talira.ai/categories/libraries/text/strings), [languages / haskell](https://talira.ai/categories/languages/haskell)
- Licence: BSD-3-Clause[^1][^2]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Herbert Valerio Riedel](https://talira.ai/orgs/herbert-valerio-riedel.md)

text-short is a Haskell package that provides the `ShortText` type, for keeping many short Unicode strings in memory, as `ShortByteString` does for `ByteString`. Unlike `Text`, `ShortText` gives up zero-copy slicing to save two words per value and stores UTF-8 rather than text-1's UTF-16, so a boxed value takes four words (two unboxed) plus its UTF-8 bytes. It has `Data`, `Typeable` and Template Haskell `Lift` instances.

## Links

- GitHub: https://github.com/haskell-hvr/text-short

## Problems it solves

- my Haskell program holds millions of short Text values and uses too much memory
- store short Unicode keys compactly in a Haskell map
- a UTF-8 string type for Haskell that's smaller than Text

## Features

- ShortText: UTF-8 strings without slicing overhead
- four words per boxed value plus the UTF-8 payload
- Data, Typeable and Template Haskell Lift instances

## Trust

Overall: 0.24 out of 1.
Signals: maintenance 0.27, adoption 0.27, momentum 0.02, community 0.45, backing 0.30, extensibility 0.00.

- 22 GitHub stars
- 12 contributors
- backed by Herbert Valerio Riedel

Warnings:

- last commit 10 months ago

## Alternatives

- [text](https://talira.ai/catalog/text-hhb25n09.md): Efficient packed Unicode text for Haskell
- [bytestring](https://talira.ai/catalog/bytestring-32f7sk6s.md): Fast, compact strict and lazy byte strings for Haskell
- [case-insensitive](https://talira.ai/catalog/case-insensitive-x8xp81yp.md): Haskell type for case-insensitive comparison of String, Text or ByteString
- [string-interpolate](https://talira.ai/catalog/string-interpolate-swhz67gk.md): Unicode-aware string interpolation for Haskell that handles all textual types

## Sources

[^1]: https://github.com/haskell-hvr/text-short/blob/master/LICENSE (checked 28 Nov 2026)
[^2]: https://github.com/haskell-hvr/text-short/blob/master/text-short.cabal (checked 28 Nov 2026)
