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-prim-0.12.0Haskell2010

GHC.CString

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

  • 8 values
  • Packageghc-prim-0.12.0
  • Exports8
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceCString.hs

Ascii variants

4 declarations
valuecstringLength# :: Addr# -> Int#
#

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

3 declarations

Other

1 declaration