GHC.Pack

base-4.20.0.0: Core data structures and operations

Copyright | (c) The University of Glasgow 1997-2002
License | see libraries/base/LICENSE
Maintainer | ghc-devs@haskell.org
Stability | internal
Portability | non-portable (GHC Extensions)
Safe Haskell | None
Language | Haskell2010

GHC.Pack

Description

Deprecated: The exports of this module should be instead imported from GHC.Exts

⚠ Warning: Starting `base-4.18`, this module is being deprecated. See https://gitlab.haskell.org/ghc/ghc/-/issues/21461 for more information.

This module provides a small set of low-level functions for packing and unpacking a chunk of bytes. Used by code emitted by the compiler plus the prelude libraries.

The programmer level view of packed strings is provided by a GHC system library PackedString.

# Documentation

packCString# :: [Char] -> ByteArray# Source #

unpackCString :: Ptr a -> [Char] Source #

unpackCString# :: Addr# -> [Char] Source #

unpackNBytes# :: Addr# -> Int# -> [Char] Source #

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

unpackAppendCString# :: Addr# -> [Char] -> [Char] Source #