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