HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulelanguage-c-0.10.2Haskell2010

Language.C.Data.Ident

This module provides the notion of identifiers in C, speed up using hashing. Identifiers are associated optionally associated with a NodeInfo, i.e. with a unique Name and a source location (Position). The ordering relation on identifiers is based on the hash and does not follow the lexical order.

  • 2 types
  • 9 values
  • Packagelanguage-c-0.10.2
  • Exports11
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceIdent.hs
datadata Ident
#

C identifiers

Constructors

Instances10Eq, Data, Ord, Show, Generic, NFData, …
datadata SUERef
#

References uniquely determining a struct, union or enum type. Those are either identified by an string identifier, or by a unique name (anonymous types).

Instances8Eq, Data, Ord, Show, Generic, NFData, …
valuemkIdent :: Position -> String -> Name -> Ident
#

build an identifier from a string.

  • only minimal error checking, e.g., the characters of the identifier are not checked for being alphanumerical only; the correct lexis of the identifier should be ensured by the caller, e.g., the scanner.

  • for reasons of simplicity the complete lexeme is hashed.

valuedumpIdent :: Ident -> String
#

dump the identifier string and its positions for debugging purposes