HORIZON HASKELLDocslts/ghc-9.14.x7a6c33e2026-10-12Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · 7a6c33e · 2026-10-12

ModuleCabal-syntax-3.16.0.0Haskell2010

Distribution.Utils.ShortText

Compact representation of short Strings

This module is designed to be import qualified

import Distribution.Utils.ShortText (ShortText)
import qualified Distribution.Utils.ShortText as ShortText
Contents
  1. ShortText type
  2. Operations
  3. internal utilities
Synopsis
newtypenewtype ShortText

Compact representation of short Strings

The data is stored internally as UTF8 in an ShortByteString when compiled against bytestring >= 0.10.4, and otherwise the fallback is to use plain old non-compat '[Char]'.

Note: This type is for internal uses (such as e.g. PackageName) and shall not be exposed in Cabal's API

Instances13Eq, Data, Ord, Read, Show, IsString, …

Operations

internal utilities

Encode String to a list of UTF8-encoded octets

Code-points in the U+D800-U+DFFF range will be encoded as the replacement character (i.e. U+FFFD).

See also decodeUtf8