Defines the level 2 language for data models that have been checked for consitency, and have been processed for general data modelling concerns without regard to specific code generators.
Dict String (L1.Declarable pos RefChecked)
L2 is a dictionary of named data model components, which has also been reference checked to ensure that all references in the model have named entries in the dictionary.
Indicates that named types in the model have been reference checked to enusure that they name something that actually exists in the L2 dictionary.
Some summary information of what they refer to is also cached during ref checking. This can be very convenient during code generation to avoid having to look up in the dictionary all the time, to find out what kind of thing a named type is.
{ name : String
, check : L1 pos -> ResultME Errors.Error (L2 pos)
}
API for an L2 model processor.
{ name : String
, check : L1 pos -> ResultME err (L2 pos)
, buildError : Errors.ErrorBuilder pos err
}
SPI for an L2 model processor. Use the builder
to turn one of these into
a Processor
.
builder : (pos -> SourcePos.SourceLines) -> ProcessorImpl pos err -> Processor pos
Builds an L2 Processor API from an implementation. A function to turn source code positions into quoted lines of source code needs to be supplied.
refCheckedConsName : RefChecked -> String
Yields the constructor name for a RefChecked
.