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
Synopsis
- value unpackCString#
- value unpackAppendCString#
- value unpackFoldrCString#
- value cstringLength#
- value unpackCStringUtf8#
- value unpackAppendCStringUtf8#
- value unpackFoldrCStringUtf8#
- value unpackNBytes#
- Packageghc-internal-10.0.0
- Exports8
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceCString.hs
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#.