Safe Haskell | None |
---|---|
Language | Haskell2010 |
Contains the annotation data types and a few auxiliary functions.
- data Annotation = Annotation {
- anSrc :: Maybe SourcePosition
- anType :: Maybe TypeExtra
- anErrs :: [TypeError]
- anImplicitCast :: Maybe TypeExtra
- anCatUpd :: [CatalogUpdate]
- type SourcePosition = (FilePath, Int, Int)
- getAnnotation :: Data a => a -> Annotation
- updateAnnotation :: Data a => (Annotation -> Annotation) -> a -> a
- emptyAnnotation :: Annotation
Annotation data types
data Annotation Source
Annotation type - one of these is attached to most of the data types used in the ast. the fields in order are:
Annotation | |
|
type SourcePosition = (FilePath, Int, Int) Source
Represents a source file position, usually set by the parser.
getAnnotation :: Data a => a -> Annotation Source
get the annotation for the root element of the tree passed
updateAnnotation :: Data a => (Annotation -> Annotation) -> a -> a Source
Update the first annotation in a tree using the function supplied
emptyAnnotation :: Annotation Source
An annotation value with no information.