HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

ModuleCabal-syntax-3.12.1.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
  • 1 type
  • 7 values

ShortText type

4 declarations
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

2 declarations

internal utilities

2 declarations
valueencodeStringUtf8 :: String -> [Word8]
#

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