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.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.9.3
  • 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