HORIZON HASKELLDocslts/ghc-9.14.x3e2d5682026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11

Moduleghc-boot-9.14.1Haskell2010

GHC.Data.ShortText

An Unicode string for internal GHC use. Meant to replace String in places where being a lazy linked is not very useful and a more memory efficient data structure is desirable.

  • 1 type
  • 9 values
  • Packageghc-boot-9.14.1
  • Exports10
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceShortText.hs

ShortText

1 declaration
newtypenewtype ShortText
#

A ShortText is a modified UTF-8 encoded string meant for short strings like file paths, module descriptions, etc.

Instances8Eq, Ord, Show, IsString, Semigroup, Monoid, …

Conversion to and from String

Operations

valuehead :: ShortText -> Char
#

O(1) Returns the first UTF-8 codepoint in the ShortText. Depending on the string in question, this may or may not be the actual first character in the string due to Unicode non-printable characters.