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

Moduleghc-9.10.3GHC2021

GHC.Types.Annotations

Support for source code annotation feature of GHC. That is the ANN pragma.

(c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998

  • 5 types
  • 7 values
  • Packageghc-9.10.3
  • Exports12
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceAnnotations.hs

Main Annotation data types

4 declarations

AnnEnv for collecting and querying Annotations

8 declarations
datadata AnnEnv
#

A collection of annotations

valuemkAnnEnv :: [Annotation] -> AnnEnv
#

Construct a new annotation environment that contains the list of annotations provided.

valuefindAnns :: Typeable a => ([Word8] -> a) -> AnnEnv -> CoreAnnTarget -> [a]
#

Find the annotations attached to the given target as Typeable values of your choice. If no deserializer is specified, only transient annotations will be returned.

valuedeserializeAnns
  1. :: Typeable a
  2. => [Word8] -> a
  3. -> AnnEnv
  4. -> (ModuleEnv [a], NameEnv [a])
#

Deserialize all annotations of a given type. This happens lazily, that is no deserialization will take place until the [a] is actually demanded and the [a] can also be empty (the UniqFM is not filtered).