ghc-prim-0.7.0: GHC primitives
Copyright (c) The University of Glasgow 2011 see libraries/ghc-prim/LICENSE cvs-ghc@haskell.org internal non-portable (GHC Extensions) None Haskell2010

GHC.CString

Contents

Description

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

Synopsis

Ascii variants

unpackFoldrCString# :: Addr# -> (Char -> a -> a) -> a -> a Source #

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 to the constant 5#.

Utf variants

unpackFoldrCStringUtf8# :: Addr# -> (Char -> a -> a) -> a -> a Source #