ghc-6.12.3: The GHC APISource codeContentsIndex
Annotations
Contents
Main Annotation data types
AnnEnv for collecting and querying Annotations
Synopsis
data Annotation = Annotation {
ann_target :: CoreAnnTarget
ann_value :: Serialized
}
data AnnTarget name
= NamedTarget name
| ModuleTarget Module
type CoreAnnTarget = AnnTarget Name
getAnnTargetName_maybe :: AnnTarget name -> Maybe name
data AnnEnv
mkAnnEnv :: [Annotation] -> AnnEnv
extendAnnEnvList :: AnnEnv -> [Annotation] -> AnnEnv
plusAnnEnv :: AnnEnv -> AnnEnv -> AnnEnv
emptyAnnEnv :: AnnEnv
findAnns :: Typeable a => ([Word8] -> a) -> AnnEnv -> CoreAnnTarget -> [a]
Main Annotation data types
data Annotation Source
Represents an annotation after it has been sufficiently desugared from it's initial form of HsDecls.AnnDecl
Constructors
Annotation
ann_target :: CoreAnnTargetThe target of the annotation
ann_value :: SerializedSerialized version of the annotation that allows recovery of its value or can be persisted to an interface file
data AnnTarget name Source
An annotation target
Constructors
NamedTarget nameWe are annotating something with a name: a type or identifier
ModuleTarget ModuleWe are annotating a particular module
show/hide Instances
type CoreAnnTarget = AnnTarget NameSource
The kind of annotation target found in the middle end of the compiler
getAnnTargetName_maybe :: AnnTarget name -> Maybe nameSource
AnnEnv for collecting and querying Annotations
data AnnEnv Source
A collection of annotations
mkAnnEnv :: [Annotation] -> AnnEnvSource
extendAnnEnvList :: AnnEnv -> [Annotation] -> AnnEnvSource
plusAnnEnv :: AnnEnv -> AnnEnv -> AnnEnvSource
emptyAnnEnv :: AnnEnvSource
findAnns :: Typeable a => ([Word8] -> a) -> AnnEnv -> CoreAnnTarget -> [a]Source
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.
Produced by Haddock version 2.6.1