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

Modulelanguage-c-0.9.3Haskell2010

Language.C.Syntax.Constants

This module provides support for representing, checking and exporting c constants, i.e. integral, float, character and string constants.

  • 8 types
  • 25 values
  • Packagelanguage-c-0.9.3
  • Exports33
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceConstants.hs

Utilities

8 declarations
newtypenewtype Flags f
#

Constructors

Instances8Generic1, Eq, Data, Ord, Generic, NFData, …

C char constants (and multi-character character constants)

8 declarations
valuecChar :: Char -> CChar
#

construct a character constant from a haskell Char Use cchar_w if you want a wide character constant.

datadata CChar
#

C char constants (abstract)

Constructors

Instances7Eq, Data, Ord, Show, Generic, NFData, …
valueshowCharConst :: Char -> ShowS
#

showCharConst c prepends _a_ String representing the C char constant corresponding to c. If necessary uses octal or hexadecimal escape sequences.

C integral constants

6 declarations
datadata CIntFlag
#

datatype representing type flags for integers

Instances9Bounded, Enum, Eq, Data, Ord, Show, …
datadata CIntRepr
#

datatype for memorizing the representation of an integer

Instances8Bounded, Enum, Eq, Data, Ord, Generic, …
datadata CInteger
#
Instances7Eq, Data, Ord, Show, Generic, NFData, …

C floating point constants

3 declarations
datadata CFloat
#

Floats (represented as strings)

Constructors

Instances7Eq, Data, Ord, Show, Generic, NFData, …

C string literals

6 declarations
datadata CString
#

C String literals

Constructors

Instances7Eq, Data, Ord, Show, Generic, NFData, …
valueshowStringLit :: String -> ShowS
#

showStringLiteral s prepends a String representing the C string literal corresponding to s. If necessary it uses octal or hexadecimal escape sequences.

Clang C version literals

2 declarations