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

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

Moduleghc-boot-10.0.0.20260917GHC2024

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

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, …
  • Eq ShortTextDefined in ghc-boot-10.0.0.20260917 · GHC.Data.ShortText
  • Ord ShortTextDefined in ghc-boot-10.0.0.20260917 · GHC.Data.ShortText
  • Show ShortTextDefined in ghc-boot-10.0.0.20260917 · GHC.Data.ShortText
  • IsString ShortTextDefined in ghc-boot-10.0.0.20260917 · GHC.Data.ShortText
  • Semigroup ShortTextDefined in ghc-boot-10.0.0.20260917 · GHC.Data.ShortText
  • Monoid ShortTextDefined in ghc-boot-10.0.0.20260917 · GHC.Data.ShortText
  • NFData ShortTextDefined in ghc-boot-10.0.0.20260917 · GHC.Data.ShortText
  • Binary ShortTextDefined in ghc-boot-10.0.0.20260917 · GHC.Data.ShortText

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.