HORIZON HASKELLDocslts/ghc-10.0.x04404a62026-10-19Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 04404a6 · 2026-10-19

Moduleghc-internal-10.0.0Haskell2010

GHC.Internal.CString

GHC C strings definitions (previously in GHC.Internal.Base). Use GHC.Exts from the base package instead of importing this module directly.

Contents
  1. Ascii variants
  2. Utf variants
  3. Other
Synopsis

Ascii variants

Compute the length of a NUL-terminated string. This address must refer to immutable memory. GHC includes a built-in rule for constant folding when the argument is a statically-known literal. That is, a core-to-core pass reduces the expression cstringLength# "hello"# to the constant 5#.

Utf variants

Other