hssqlppp-0.0.10: Sql parser and type checkerSource codeContentsIndex
Database.HsSqlPpp.Ast.Annotation
Contents
Annotation data types
Statement info
Description
Contains the annotation data types and a few auxiliary functions.
Synopsis
type Annotation = [AnnotationElement]
data AnnotationElement
= SourcePos String Int Int
| TypeAnnotation Type
| TypeErrorA TypeError
| StatementInfoA StatementInfo
| EnvUpdates [EnvironmentUpdate]
data StatementInfo
= DefaultStatementInfo Type
| SelectInfo Type
| InsertInfo String Type
| UpdateInfo String Type
| DeleteInfo String
stripAnnotations :: Data a => a -> a
updateAnnotation :: forall a. Data a => (Annotation -> Annotation) -> a -> a
getAnnotation :: forall a. Data a => a -> Annotation
Annotation data types
type Annotation = [AnnotationElement]Source
Annotation type - one of these is attached to most of the data types used in the ast.
data AnnotationElement Source
the elements of an annotation. Source positions are generated by the parser, the rest come from the separate ast annotation process.
Constructors
SourcePos String Int Int
TypeAnnotation Type
TypeErrorA TypeError
StatementInfoA StatementInfo
EnvUpdates [EnvironmentUpdate]
show/hide Instances
Statement info
This is the main annotation attached to each statement. Early days at the moment but will be expanded to provide any type errors lurking inside a statement, any useful types, e.g. the types of each select and subselect/sub query in a statement, any changes to the catalog the statement makes, and possibly much more information.
data StatementInfo Source
Constructors
DefaultStatementInfo Type
SelectInfo Type
InsertInfo String Type
UpdateInfo String Type
DeleteInfo String
show/hide Instances
stripAnnotations :: Data a => a -> aSource
strip all the annotations from a tree. E.g. can be used to compare two asts are the same, ignoring any source position annotation differences.
updateAnnotation :: forall a. Data a => (Annotation -> Annotation) -> a -> aSource
getAnnotation :: forall a. Data a => a -> AnnotationSource
Produced by Haddock version 2.6.0