Safe Haskell | None |
---|---|
Language | Haskell98 |
Contains the annotation data types and a few auxiliary functions.
- data Annotation = Annotation {
- asrc :: Maybe SourcePosition
- atype :: Maybe Type
- errs :: [TypeError]
- stType :: Maybe StatementType
- catUpd :: [CatalogUpdate]
- fnProt :: Maybe FunctionPrototype
- infType :: Maybe Type
- type SourcePosition = (String, Int, Int)
- type StatementType = ([Type], [(String, Type)])
- getAnnotation :: Data a => a -> Annotation
- updateAnnotations :: Data a => (Annotation -> Annotation) -> a -> a
- updateAnnotation :: Data a => (Annotation -> Annotation) -> a -> a
- getAnnotations :: Data a => a -> [Annotation]
- emptyAnnotation :: Annotation
- resetAnnotations :: Data a => a -> a
Annotation data types
data Annotation Source
Annotation type - one of these is attached to most of the data types used in the ast.
Annotation | |
|
type SourcePosition = (String, Int, Int) Source
Represents a source file position, usually set by the parser.
type StatementType = ([Type], [(String, Type)]) Source
Statement type is used for getting type information for a parameterized statement.
getAnnotation :: Data a => a -> Annotation Source
get the annotation for the root element of the tree passed
updateAnnotations :: Data a => (Annotation -> Annotation) -> a -> a Source
update all the annotations in a tree
updateAnnotation :: Data a => (Annotation -> Annotation) -> a -> a Source
Update all the annotations in a tree using the function supplied
getAnnotations :: Data a => a -> [Annotation] Source
get all the annotations from a tree
emptyAnnotation :: Annotation Source
An annotation value with no information.
resetAnnotations :: Data a => a -> a Source
Set all the annotations in a tree to be emptyAnnotation
.