HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

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.

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