Protocol Documentation
Table of Contents
-
-
- Error
- Input
- InternalError
- KindCheckError
- KindCheckError.CyclicKindError
- KindCheckError.InconsistentTypeError
- KindCheckError.UnboundTyRefError
- KindCheckError.UnboundTyVarError
- KindCheckError.UnificationError
- NamingError
- Output
- ProtoParseError
- ProtoParseError.MultipleClassDefError
- ProtoParseError.MultipleConstructorError
- ProtoParseError.MultipleFieldError
- ProtoParseError.MultipleImportError
- ProtoParseError.MultipleModuleError
- ProtoParseError.MultipleTyArgError
- ProtoParseError.MultipleTyDefError
- ProtoParseError.OneOfNotSetError
- ProtoParseError.UnknownEnumError
- Result
- TyClassCheckError
- TyClassCheckError.DeriveOpaqueError
- TyClassCheckError.ImportNotFoundError
- TyClassCheckError.MissingRuleError
- TyClassCheckError.OverlappingRulesError
- TyClassCheckError.OverlappingRulesError.QHead
- TyClassCheckError.SuperclassCycleError
- TyClassCheckError.UnboundClassRefError
lang.proto
ClassConstraint
Class constraints
A special constraint type denoting the constraints that occur on the rhs of
class definitions. Only used to specify super class constraints in a
ClassDef
.
Not to be confused with Constraint
which denote type class rules.
Field | Type | Label | Description |
---|---|---|---|
class_ref | TyClassRef | Type class reference. | |
args | TyVar | repeated | Type variables quantified over ClassDef arguments. |
ClassDef
Type class definition
LambdaBuffers use type classes to talk about the various 'meanings' or 'semantics' we want to associate with the types in LambdaBuffers schemata.
For instance, most types can have Eq
semantics, meaning they can be
compared for equality. Other can have Ord
semantics, meaning they can be
ordered.
Using type classes and instance declarations, much like in Haskell, users can specify the 'meaning' of each type they declare. For example, serialization in LambdaBuffers is just another type class, it's treated the same as any other type class. Concretely, if we wish to provide JSON serialization for LambdaBuffers types, we declare such a type class and provide desired semantic rules:
module Foo
class JSON a
sum Foo a b = Bar a | Baz b
derive JSON (Foo a b)
Note that for each type class introduced, the Codegen machinery must be
updated to support said type class. In other words, it doesn't come for free
and for each new type class, a Codegen support must be implemented for any
InstanceClause
declared by the user. Once all the InstanceClause
s have an
implementation provided, all the Derive
d implementation come for free.
Field | Type | Label | Description |
---|---|---|---|
class_name | ClassName | Type class name. | |
class_args | TyArg | repeated | Type class arguments. Class with no arguments is a trivial class. Compiler MAY report an error. TODO(bladyjoker): MultipleClassArgError. |
supers | ClassConstraint | repeated | Superclass constraints. |
documentation | string | Documentation elaborating on the type class. | |
source_info | SourceInfo | Source information. |
ClassName
Type class name
Field | Type | Label | Description |
---|---|---|---|
name | string | Name ::= [A-Z]+[A-Za-z0-9_]* | |
source_info | SourceInfo | Source information. |
ConstrName
Sum type constructor name
Field | Type | Label | Description |
---|---|---|---|
name | string | Name ::= [A-Z]+[A-Za-z0-9_]* | |
source_info | SourceInfo | Source information. |
Constraint
Constraint term
Field | Type | Label | Description |
---|---|---|---|
class_ref | TyClassRef | Name of the type class. | |
args | Ty | repeated | Constraint arguments. Constraint with no arguments is a trivial constraint. Compiler MAY report an error. |
source_info | SourceInfo | Source information. |
Derive
Derive statement
Derive statements enable user to specify 'semantic' rules for their types much
like InstanceClause
s do. However, the Codegen will be able to derive an
implementation for any such constraint.
module Prelude
class Eq a
sum Maybe a = Just a | Nothing
derive Eq (Maybe a)
The rule installed for the derive statement is:
eq(maybe(A)) :- eq(just(A) | Nothing).
The rule relates the desired Ty
term to its (lambda calculus)
'evaluated' form.
> Currently, there's only support for deriving type class rules and
implementations for Ty
terms of Kind.KIND_REF_TYPE
. That means,
type classes like Ord and Eq...
Field | Type | Label | Description |
---|---|---|---|
constraint | Constraint | Constraint to derive. |
FieldName
Record type field name
Field | Type | Label | Description |
---|---|---|---|
name | string | Name ::= [a-z]+[A-Za-z0-9_]* | |
source_info | SourceInfo | Source information. |
InstanceClause
Instance clause
Instance clauses enable users to specify ad-hoc 'semantic' rules for their types. Each such instance must be supported explicitly in the Codegen by providing runtime implementations.
This rule form is used when declaring 'opaque' implementations on Opaque
types.
module Prelude
class Eq a
opaque Maybe a
instance Eq a => Eq (Maybe a)
The rule installed for the clause is:
eq(maybe(A)) :- eq(A).
The instance clause is verbatim added to the rule set.
Field | Type | Label | Description |
---|---|---|---|
head | Constraint | Head of the clause that holds only when the body holds. Type variables introduced in the head of the rule become available in the scope of the body of the rule. | |
constraints | Constraint | repeated | Instance (rule) body, conjunction of constraints. |
source_info | SourceInfo | Source information. |
Kind
Kinds
A type of a type is called a 'kind'.
In Lambda Buffers, all type terms, namely TyArg, TyVar, TyRef, TyApp and TyAbs,
are either of kind Type
or Type -> Type
and Type -> Type -> Type
etc.
Field | Type | Label | Description |
---|---|---|---|
kind_ref | Kind.KindRef | ||
kind_arrow | Kind.KindArrow |
Kind.KindArrow
A kind arrow.
Module
Module
A module encapsulates type, class and instance definitions.
Field | Type | Label | Description |
---|---|---|---|
module_name | ModuleName | Module name. | |
type_defs | TyDef | repeated | Type definitions. Duplicate type definitions MUST be reported with ProtoParseError.MultipleTyDefError . |
class_defs | ClassDef | repeated | Type class definitions. Duplicate class definitions MUST be reported with ProtoParseError.MultipleClassDefError . |
instances | InstanceClause | repeated | Type class instance clauses. |
derives | Derive | repeated | Type class derive statements. |
imports | ModuleName | repeated | Imported modules the Compiler consults when searching for type class rules. TODO(bladyjoker): Rename to ruleImports. Duplicate imports MUST be reported with ProtoParseError.MultipleImportError . |
source_info | SourceInfo | Source information. |
ModuleName
Module name
Field | Type | Label | Description |
---|---|---|---|
parts | ModuleNamePart | repeated | Parts of the module name denoting a hierarchical namespace. |
source_info | SourceInfo | Source information. |
ModuleNamePart
Module name part
Field | Type | Label | Description |
---|---|---|---|
name | string | Name ::= [A-Z]+[A-Za-z0-9_]* | |
source_info | SourceInfo | Source information. |
Opaque
Opaque type.
A type that has an Opaque
body represents a 'built-in' or a 'primitive' type
that's handled by the semantics 'under the hood'. It's called 'opaque' to denote
the fact that the Compiler has no knowledge of its structure, and relies that
the necessary knowledge is implemented elsewhere. The Codegen modules for any
target language have to be able to handle such types specifically and map to
existing value level representations and corresponding types.
Codegen modules would have to implement support for such defined types, for example:
- In Python
Set a
would map toset()
from the standard library, - In Haskell
Set a
would map tocontainers
.Data.Set.Set type.
Every Opaque
type has to be considered deliberately for each language
environment targeted by Codegen modules.
TODO(bladyjoker): Consider attaching explicit Kind terms to Opaques.
Field | Type | Label | Description |
---|---|---|---|
source_info | SourceInfo | Source information. |
Product
A product type term.
Field | Type | Label | Description |
---|---|---|---|
fields | Ty | repeated | Fields in a products are types. |
source_info | SourceInfo | Source information. |
Record
A record type term.
Field | Type | Label | Description |
---|---|---|---|
fields | Record.Field | repeated | Record fields. |
source_info | SourceInfo | Source information. |
Record.Field
Field in a record type.
SourceInfo
Frontend Source information
Frontends are advised to include Source information to denote how their Source* content maps to the Compiler Input. It's essential when reporting Compiler* errors back to the Frontend.
Field | Type | Label | Description |
---|---|---|---|
file | string | A filename denoting the Source file. | |
pos_from | SourcePosition | Starting position in Source. | |
pos_to | SourcePosition | End position in Source. |
SourcePosition
Position in Source
Sum
A sum type term.
A type defined as a Sum type is just like a Haskell algebraic data type and represents a sum of products.
Field | Type | Label | Description |
---|---|---|---|
constructors | Sum.Constructor | repeated | Sum type constructors. Empty constructors means void and means that the type can't be constructed. Compiler MAY report an error. Duplicate constructors MUST be reported with ProtoParseError.MultipleConstructorError . |
source_info | SourceInfo | Source information. |
Sum.Constructor
Constructor of a Sum type is a Product type term.
Field | Type | Label | Description |
---|---|---|---|
constr_name | ConstrName | Constructor name. | |
product | Product | Product type term. |
Ty
Type term
A type term that occurs in bodies of type definitions (message TyDef):
sum Maybe a = Just a | Nothing
sum Either a b = Left a | Right b
sum SomeType a = Foo a (Maybe a) | Bar (Either (Maybe a) (SomeType a))
or in instance declarations:
instance Eq (Maybe a)
instance Eq (SomeType Int)
instance (Eq (Maybe a), Eq (SomeType a)) Eq (Either (Maybe a) (SomeType a))
Check out examples.
Field | Type | Label | Description |
---|---|---|---|
ty_var | TyVar | A type variable. | |
ty_app | TyApp | A type application. | |
ty_ref | TyRef | A type reference. |
TyAbs
Type abstraction
A type term that introduces type abstractions (ie. type functions). This type term can only be introduced in the context of a [type definition](@ref TyDef).
Field | Type | Label | Description |
---|---|---|---|
ty_args | TyArg | repeated | List of type variables. No type arguments means delay or const ty_body , meaning TyAbs [] ty_body = ty_body . Duplicate type arguments MUST be reported with ProtoParseError.MultipleTyArgError . |
ty_body | TyBody | Type body. | |
source_info | SourceInfo | Source information. |
TyApp
Type application
A type term that applies a type abstraction to a list of arguments.
Field | Type | Label | Description |
---|---|---|---|
ty_func | Ty | Type function. TODO(bladyjoker): Rename to ty_abs? | |
ty_args | Ty | repeated | Arguments to apply. No arguments to apply means force , meaning `TyApp ty_func [] = ty_func`` |
source_info | SourceInfo | Source information. |
TyArg
Type arguments
Arguments in type abstractions.
Type arguments and therefore type variables have kinds, the Compiler only
accepts Type
kinded type arguments ans therefore type variables.
However, to allow for future evolution if ever necessary, we attach the Kind
term to type arguments, even though the Compiler will reject any TyArg that's
not of kind Type
.
Note, this effectively means that lambda Buffers doesn't support higher-kinded types (ie. HKT).
Field | Type | Label | Description |
---|---|---|---|
arg_name | VarName | Argument name corresponds to variable names. | |
arg_kind | Kind | Argument kind. | |
source_info | SourceInfo | Source information. |
TyBody
Type body.
Lambda Buffers type bodies type terms that can only be specified in the
TyAbs
context. It's a built-in type term that can only occur enclosed
within a TyAbs
term which introduces TyVar
s in the scope of the term.
TyClassRef
Type class references
It is necessary to know whether a type class is defined locally or in a foreign module when referring to it in a constraint, this allows users (and requires the frontend) to explicitly communicate that information.
Field | Type | Label | Description |
---|---|---|---|
local_class_ref | TyClassRef.Local | ||
foreign_class_ref | TyClassRef.Foreign |
TyClassRef.Foreign
Foreign class reference.
Field | Type | Label | Description |
---|---|---|---|
class_name | ClassName | Foreign module class name. | |
module_name | ModuleName | Foreign module name. | |
source_info | SourceInfo | Source information. |
TyClassRef.Local
Local type reference.
Field | Type | Label | Description |
---|---|---|---|
class_name | ClassName | Local module class name. | |
source_info | SourceInfo | Source information. |
TyDef
Type definition
A type definition consists of a type name and its associated type term.
One way to look at it is that a type definition introduces a named 'type
abstraction' in the module scope. Concretely, Either
can be considered a type
lambda of kind Type -> Type -> Type
.
In fact, type definitions are the only way to introduce such types.
Once introduced in the module scope, type definitions are referred to using [TyRef](@ref TyRef) term.
Field | Type | Label | Description |
---|---|---|---|
ty_name | TyName | Type name. | |
ty_abs | TyAbs | Type term. | |
source_info | SourceInfo | Source information. |
TyName
Type name
Field | Type | Label | Description |
---|---|---|---|
name | string | Name ::= [A-Z]+[A-Za-z0-9_]* | |
source_info | SourceInfo | Source information. |
TyRef
Type reference
A type term that denotes a reference to a type available that's declared locally or in foreign modules.
Field | Type | Label | Description |
---|---|---|---|
local_ty_ref | TyRef.Local | ||
foreign_ty_ref | TyRef.Foreign |
TyRef.Foreign
Foreign type reference.
Field | Type | Label | Description |
---|---|---|---|
ty_name | TyName | Foreign module type name. | |
module_name | ModuleName | Foreign module name. | |
source_info | SourceInfo | Source information. |
TyRef.Local
Local type reference.
Field | Type | Label | Description |
---|---|---|---|
ty_name | TyName | Local module type name. | |
source_info | SourceInfo | Source information. |
TyVar
Type variable
Field | Type | Label | Description |
---|---|---|---|
var_name | VarName | Variable name. |
Tys
A list of type terms useful for debugging
Field | Type | Label | Description |
---|---|---|---|
ties | Ty | repeated |
VarName
Type variable name
Field | Type | Label | Description |
---|---|---|---|
name | string | Name ::= [a-z]+ | |
source_info | SourceInfo | Source information. |
Kind.KindRef
A built-in kind.
Name | Number | Description |
---|---|---|
KIND_REF_UNSPECIFIED | 0 | Unspecified kind SHOULD be inferred by the Compiler. |
KIND_REF_TYPE | 1 | A Type kind (also know as * in Haskell) built-in. |
compiler.proto
Error
Compiler Error
Field | Type | Label | Description |
---|---|---|---|
proto_parse_errors | ProtoParseError | repeated | Errors occurred during proto parsing. |
naming_errors | NamingError | repeated | Errors occurred during naming checking. |
kind_check_errors | KindCheckError | repeated | Errors occurred during kind checking. |
ty_class_check_errors | TyClassCheckError | repeated | Errors occurred during type class checking. |
internal_errors | InternalError | repeated | Errors internal to the compiler implementation. |
Input
Compiler Input
Compiler Input is a fully self contained list of modules, the entire compilation closure needed by the Compiler to perform its task.
Field | Type | Label | Description |
---|---|---|---|
modules | lambdabuffers.Module | repeated | Modules to compile. Duplicate modules MUST be reported with ProtoParseError.MultipleModuleError . |
InternalError
Errors internal to the implementation.
Field | Type | Label | Description |
---|---|---|---|
msg | string | Error message. | |
source_info | lambdabuffers.SourceInfo | Source information if meaningful. |
KindCheckError
Kind checking errors.
Field | Type | Label | Description |
---|---|---|---|
unbound_ty_ref_error | KindCheckError.UnboundTyRefError | ||
unbound_ty_var_error | KindCheckError.UnboundTyVarError | ||
unification_error | KindCheckError.UnificationError | ||
cyclic_kind_error | KindCheckError.CyclicKindError | ||
inconsistent_type_error | KindCheckError.InconsistentTypeError |
KindCheckError.CyclicKindError
A cyclic kind was encountered. Infinite kinds like this are not acceptable, and we do not support them. We could not construct infinite kind in ty_def.
As the implementation currently stands such an error is (most likely) not representable - therefore not reachable. Such an error would usually occur for a term like: λa. a a - in which case the inference would try to unify two kinds of the form: m and m -> n - because m appears in both terms - the cyclic unification error would be thrown.
In the case of LambdaBuffers - such an error is not (currently) achievable as the kind of the variable is given by the context - (i.e. λa : m . a a, where m is a kind) therefore the unification would fail with Unification Error. Nevertheless - future features might require it.
Field | Type | Label | Description |
---|---|---|---|
ty_def | lambdabuffers.TyDef | ||
module_name | lambdabuffers.ModuleName |
KindCheckError.InconsistentTypeError
The actual_kind differs from the expected_kind.
Field | Type | Label | Description |
---|---|---|---|
module_name | lambdabuffers.ModuleName | ||
ty_def | lambdabuffers.TyDef | ||
actual_kind | lambdabuffers.Kind | ||
expected_kind | lambdabuffers.Kind |
KindCheckError.UnboundTyRefError
Unbound type reference ty_ref detected in term ty_def.
Field | Type | Label | Description |
---|---|---|---|
module_name | lambdabuffers.ModuleName | ||
ty_def | lambdabuffers.TyDef | ||
ty_ref | lambdabuffers.TyRef |
KindCheckError.UnboundTyVarError
Unbound variable ty_var detected in term ty_def.
Field | Type | Label | Description |
---|---|---|---|
module_name | lambdabuffers.ModuleName | ||
ty_def | lambdabuffers.TyDef | ||
ty_var | lambdabuffers.TyVar |
KindCheckError.UnificationError
In ty_def an error has occurred when trying to unify kind ty_kind_lhs with ty_kind_rhs.
FIXME(cstml): Add source of constraint to the error such that user can see where the constraint was generated - therefore where the error precisely is.
Field | Type | Label | Description |
---|---|---|---|
module_name | lambdabuffers.ModuleName | ||
ty_def | lambdabuffers.TyDef | ||
ty_kind_lhs | lambdabuffers.Kind | ||
ty_kind_rhs | lambdabuffers.Kind |
NamingError
Naming error message
Field | Type | Label | Description |
---|---|---|---|
module_name_err | lambdabuffers.ModuleNamePart | ||
ty_name_err | lambdabuffers.TyName | ||
var_name_err | lambdabuffers.VarName | ||
constr_name_err | lambdabuffers.ConstrName | ||
field_name_err | lambdabuffers.FieldName | ||
class_name_err | lambdabuffers.ClassName |
Output
Output of the Compiler.
ProtoParseError
All errors that occur because of Google Protocol Buffer's inability to enforce certain invariants. Some of invariance:
- using Proto
map
restricts users tostring
keys which impacts API documentation, which is whyrepeated
fields are used throughout, - using Proto 'oneof' means users have to check if such a field is set or report an error otherwise.
Field | Type | Label | Description |
---|---|---|---|
multiple_module_error | ProtoParseError.MultipleModuleError | ||
multiple_tydef_error | ProtoParseError.MultipleTyDefError | ||
multiple_classdef_error | ProtoParseError.MultipleClassDefError | ||
multiple_tyarg_error | ProtoParseError.MultipleTyArgError | ||
multiple_constructor_error | ProtoParseError.MultipleConstructorError | ||
multiple_field_error | ProtoParseError.MultipleFieldError | ||
multiple_import_error | ProtoParseError.MultipleImportError | ||
one_of_not_set_error | ProtoParseError.OneOfNotSetError | ||
unknown_enum_error | ProtoParseError.UnknownEnumError |
ProtoParseError.MultipleClassDefError
Multiple ClassDefs with the same ClassName were found in ModuleName.
Field | Type | Label | Description |
---|---|---|---|
module_name | lambdabuffers.ModuleName | Module in which the error was found. | |
class_defs | lambdabuffers.ClassDef | repeated | Conflicting class definitions. |
ProtoParseError.MultipleConstructorError
Multiple Sum Constructors with the same ConstrName were found in ModuleName.TyDef.
Field | Type | Label | Description |
---|---|---|---|
module_name | lambdabuffers.ModuleName | Module in which the error was found. | |
ty_def | lambdabuffers.TyDef | Type definition in which the error was found. | |
constructors | lambdabuffers.Sum.Constructor | repeated | Conflicting constructors. |
ProtoParseError.MultipleFieldError
Multiple Record Fields with the same FieldName were found in ModuleName.TyDef.
Field | Type | Label | Description |
---|---|---|---|
module_name | lambdabuffers.ModuleName | Module in which the error was found. | |
ty_def | lambdabuffers.TyDef | Type definition in which the error was found. | |
fields | lambdabuffers.Record.Field | repeated | Conflicting record fields. |
ProtoParseError.MultipleImportError
Field | Type | Label | Description |
---|---|---|---|
module_name | lambdabuffers.ModuleName | Module in which the error was found. | |
imports | lambdabuffers.ModuleName | repeated | Conflicting module imports. |
ProtoParseError.MultipleModuleError
Multiple Modules with the same ModuleName were found.
Field | Type | Label | Description |
---|---|---|---|
modules | lambdabuffers.Module | repeated | Conflicting type definitions. |
ProtoParseError.MultipleTyArgError
Multiple TyArgs with the same ArgName were found in ModuleName.TyDef.
Field | Type | Label | Description |
---|---|---|---|
module_name | lambdabuffers.ModuleName | Module in which the error was found. | |
ty_def | lambdabuffers.TyDef | Type definition in which the error was found. | |
ty_args | lambdabuffers.TyArg | repeated | Conflicting type abstraction arguments. |
ProtoParseError.MultipleTyDefError
Multiple TyDefs with the same TyName were found in ModuleName.
Field | Type | Label | Description |
---|---|---|---|
module_name | lambdabuffers.ModuleName | Module in which the error was found. | |
ty_defs | lambdabuffers.TyDef | repeated | Conflicting type definitions. |
ProtoParseError.OneOfNotSetError
Proto oneof
field is not set.
Field | Type | Label | Description |
---|---|---|---|
message_name | string | Proto message name in which the oneof field is not set. | |
field_name | string | The oneof field that is not set. |
ProtoParseError.UnknownEnumError
Proto enum
field is unknown.
Field | Type | Label | Description |
---|---|---|---|
enum_name | string | Proto enum name. | |
got_tag | string | The unknown tag for the enum . |
Result
Compiler Result ~ a successful Compilation Output.
TyClassCheckError
Type class checking errors.
Field | Type | Label | Description |
---|---|---|---|
unbound_class_ref_err | TyClassCheckError.UnboundClassRefError | ||
superclass_cycle_err | TyClassCheckError.SuperclassCycleError | ||
import_not_found_err | TyClassCheckError.ImportNotFoundError | ||
derive_opaque_err | TyClassCheckError.DeriveOpaqueError | ||
missing_rule_err | TyClassCheckError.MissingRuleError | ||
overlapping_rules_err | TyClassCheckError.OverlappingRulesError |
TyClassCheckError.DeriveOpaqueError
In module_name
it wasn't possible to solve constraint
because a
sub_constraint
has been derived on an Opaque
type. Opaque
type can
only have an InstanceClause
declared for them.
Field | Type | Label | Description |
---|---|---|---|
module_name | lambdabuffers.ModuleName | ||
constraint | lambdabuffers.Constraint | ||
sub_constraint | lambdabuffers.Constraint |
TyClassCheckError.ImportNotFoundError
Import missing
wasn't found in module_name
Field | Type | Label | Description |
---|---|---|---|
module_name | lambdabuffers.ModuleName | ||
missing | lambdabuffers.ModuleName |
TyClassCheckError.MissingRuleError
In module_name
while trying to solve constraint
it wasn't possible to
find a rule (Derive
or InstanceClause
) for sub_constraint
.
Field | Type | Label | Description |
---|---|---|---|
module_name | lambdabuffers.ModuleName | ||
constraint | lambdabuffers.Constraint | ||
sub_constraint | lambdabuffers.Constraint |
TyClassCheckError.OverlappingRulesError
In module_name
while trying to solve constraint
overlaps
(Derive
or InstanceClause
) were found that could be used to solve the
sub_constraint
.
Field | Type | Label | Description |
---|---|---|---|
module_name | lambdabuffers.ModuleName | ||
constraint | lambdabuffers.Constraint | ||
sub_constraint | lambdabuffers.Constraint | ||
overlaps | TyClassCheckError.OverlappingRulesError.QHead | repeated |
TyClassCheckError.OverlappingRulesError.QHead
NOTE(bladyjoker): This should rather be oneof Derive
and
InstanceClause
.
Field | Type | Label | Description |
---|---|---|---|
module_name | lambdabuffers.ModuleName | ||
head | lambdabuffers.Constraint |
TyClassCheckError.SuperclassCycleError
Superclass cycle cycled_class_refs
was detected when checking a
class definition for class_name
in module module_name
.
Field | Type | Label | Description |
---|---|---|---|
module_name | lambdabuffers.ModuleName | ||
class_name | lambdabuffers.ClassName | ||
cycled_class_refs | lambdabuffers.TyClassRef | repeated |
TyClassCheckError.UnboundClassRefError
Unbound class_ref
detected in module_name
.
Field | Type | Label | Description |
---|---|---|---|
module_name | lambdabuffers.ModuleName | ||
class_ref | lambdabuffers.TyClassRef |
codegen.proto
Error
Codegen Error
Field | Type | Label | Description |
---|---|---|---|
internal_errors | InternalError | repeated | |
unsupported_opaque_errors | UnsupportedOpaqueError | repeated | |
unsupported_class_errors | UnsupportedClassError | repeated |
Input
Codegen Input
Codegen Input is a fully self contained list of modules, that have been checked by the Compiler.
Field | Type | Label | Description |
---|---|---|---|
modules | lambdabuffers.Module | repeated | Modules to codegen. |
InternalError
Errors internal to the implementation.
Field | Type | Label | Description |
---|---|---|---|
msg | string | Error message. | |
source_info | lambdabuffers.SourceInfo | Source information if meaningful. |
Output
Codegen output.
Result
Codegen Result ~ a successful Codegen Output.
UnsupportedClassError
Unsupported Class
error for a class class_name
defined in module
module_name
.
Field | Type | Label | Description |
---|---|---|---|
module_name | lambdabuffers.ModuleName | ||
class_name | lambdabuffers.ClassName |
UnsupportedOpaqueError
Unsupported Opaque
error for a type ty_name
defined in module
module_name
.
Field | Type | Label | Description |
---|---|---|---|
module_name | lambdabuffers.ModuleName | ||
ty_name | lambdabuffers.TyName |