HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleghc-boot-9.10.3Haskell2010

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.10.3
  • 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.