Diagnostics
This page lists every message the compiler can report about a program, grouped by cause. Internal assertions and provenance lines (Called from here, Created here, Referenced here) are described, not listed. Each entry gives the message as printed, the condition that produces it, the change that resolves it, and the pages that define the rule behind it. A normal node diagnostic follows the location and the «token» being processed; parse errors, file errors, and command-line errors have their own shapes (see the Compiler page). Italic words in a message are placeholders; see Placeholders.
Placeholders
Placeholders are set in italics: name is a source name when the message prints one, or mplc's label for a named operand; schema is a schema as printStack prints it; requirement is the required kind as the message spells it, such as Cond, Number, or List or Tuple; number is a count or index; file and module are paths. operand is the compiler's object designation: Argument (label), First argument (label), Second argument (label), … counted from the lowest consumed input, where label is mplc's label for the operand and may differ from the Reference stack effect; mplc includes the parenthesized label only when it names the operand. It can also be Input «name» for a Code input; name is the label carried by the Code signature and is empty for this message when the signature has one input. It can also be Variadic tuple, Output value (condition), New value, or New item. hook is one of CALL, PRE, INIT, DIE, or ASSIGN. character, opener, and closer are the printed character or delimiter; parser-error is a parser payload; parameter is a command-line parameter; module-descriptor is the printed module binding; text is program-supplied Text; and assertion is the internal assertion text.
Some messages omit the parenthesized operand label. In signature and write messages, inputs, options, source-name, and struct-name are compiler operand designators, not names written in the program. item-name designates the selected item; item-caption is the printed Field «name» or Item number caption; and formatted-source-value, formatted-struct-value, and formatted-item-value are the corresponding printed values. branch is the TRUE or FALSE branch, label-list is the printed list of unused labels, stack-item-lines are the formatted objects left on the module data stack, line and column are source coordinates, and expected is the required option schema or type. The texts are those of mplc 260513.1; they are compiler specifics and may change, while the rules they enforce are documented on the linked pages.
Names and lookup
| Message | Cause and fix | See |
|---|---|---|
The exportFunction or importFunction builtin receives an empty Text as its function name. Supply a non-empty Text name before declaring or importing the function. |
Names, lookup, and overloads, exportFunction, importFunction | |
The use builtin loads module but finds no public name name in that module. Correct the descriptor or define the requested name at module level and make it public. |
Modules, Names, lookup, and overloads, use | |
The .NAME member mention selects a Dict but finds neither a field nor a matching predicate named name. Use an existing public field or predicate, or add that field to the Dict. |
Selection and destinations, NameMember, Dict | |
The .NAME member mention finds exactly one predicate named name, and its PRE either returns known FALSE or fails processing gracefully. Make the guard accept the supplied inputs, repair an unintended failure inside PRE, or provide an older fallback candidate. |
Selection and destinations, NameMember, Cond | |
The .NAME member mention tries number predicates named name, and each is rejected because its PRE returns known FALSE or fails processing gracefully. Make a guard accept the supplied inputs, repair an unintended failure inside PRE, or provide an older fallback candidate. |
Selection and destinations, NameMember, Cond | |
The .NAME or .@NAME member mention selects a private Dict field that is not visible from the selecting scope. Make the field public or perform the selection from the Dict that declares it. |
Selection and destinations, Names, lookup, and overloads, NameMember | |
A NAME or .NAME calling mention selects field name, which is a known NIL Code object. Assign a non-NIL Code before calling it; use a non-calling read such as .@NAME when inspecting the NIL Code is intended. |
Known and unknown values, NameMember, Code | |
A NAME or !NAME mention finds no local, field, module name, or builtin with that name in the visible scopes. Check the spelling, load the defining module with use, or define the name before this mention. |
Names, lookup, and overloads, Name | |
A calling mention finds exactly one predicate named name, and its PRE either returns known FALSE or fails processing gracefully. Make the guard accept the supplied inputs, repair an unintended failure inside PRE, or provide an older fallback candidate. |
Names, lookup, and overloads, Name, Cond | |
A calling mention tries number predicates named name, and none has a PRE that returns TRUE. Make one predicate match or add a fallback. |
Names, lookup, and overloads, Name, Cond | |
The NAME mention resolves local name to a Code object whose known value is NIL. Assign or construct a non-NIL Code object before using that local. |
Names, lookup, and overloads, Name, Code | |
The .@NAME read mention cannot find the requested field in its Dict argument. Correct the field name or add a public field with that name. |
Selection and destinations, NameReadMember, Dict | |
The @NAME read mention finds no local, field, module name, or builtin with the requested name. Check the spelling and define or import the name before reading it. |
Names, lookup, and overloads, NameRead | |
@NAME is used with a builtin name, but builtins are operations rather than readable objects. Invoke the builtin directly, or put it in a Block such as [NAME] when a callable object is needed. |
Names, lookup, and overloads, NameRead, Block and Code | |
!NAME selects a builtin name as its destination, but builtins cannot be written. Use a user-defined local or field as the destination. |
Selection and destinations, NameWrite, Names, lookup, and overloads | |
The ; Variable node has no pending label to bind to the top object. Put a label such as x: before ;, or remove the stray terminator. |
Data stack and name stack, Variable | |
A predicate finishes without a known Cond object as its result; it may leave no result, a different schema, or an unknown value. Make the predicate leave a known Cond on its output stack. |
PRE result, Known and unknown values, Cond | |
Scope processing ends with one label that no ; Variable node consumed. Remove the label or bind an object through it before the scope closes. |
Data stack and name stack, Variable, Names, lookup, and overloads | |
Scope processing ends with several labels that no ; Variable nodes consumed. Remove the unused labels or consume each with its intended object before leaving the scope. |
Data stack and name stack, Variable, Names, lookup, and overloads | |
callField selects its first Dict argument and finds neither a field nor a matching predicate named name. Correct the field name or add a public callable field or predicate to the Dict schema. |
callField, Selection and destinations, Dict | |
callField finds exactly one predicate named name in its first Dict argument, and its PRE either returns known FALSE or fails processing gracefully. Make the guard accept the supplied inputs, repair an unintended failure inside PRE, or provide an older fallback candidate. |
callField, Selection and destinations, Cond | |
callField tries number predicates named name in its first Dict argument, and each is rejected because its PRE returns known FALSE or fails processing gracefully. Make a guard accept the supplied inputs, repair an unintended failure inside PRE, or provide an older fallback candidate. |
callField, Selection and destinations, Cond |
Stack shape and function outputs
| Message | Cause and fix | See |
|---|---|---|
if processes an unknown condition, and its true and false branches leave different numbers of objects. Make both branches consume and produce the same number of objects. |
Stacks, if |
|
loop processes a runtime-repeated body that leaves a different number of objects from the number it receives, apart from the final condition. Return the carried objects followed by exactly one Cond. |
Stacks, loop, Cond |
|
loop leaves a top output object whose schema is not Cond, including during a static iteration. Leave a Cond as the body's final output. |
Stacks, loop, Cond |
|
| A function Block leaves one or more declared input objects unconsumed. Consume every declared input in the Block. | Block code, Call boundary, exportFunction |
|
| A Code body declares no output but leaves objects, or declares an output but leaves more than one object. Consume the extra objects. To return several results, pack them into one Struct and declare that Struct as the output. | Declared output, Call boundary | |
| A function body with a non-empty output signature leaves no object for its declared output. Produce one object matching the declared output. | Declared output, Call boundary | |
| A function returns a Ref with the wrong target schema: a Ref output requires the target schema named by that Ref signature, while a non-Ref output requires the declared output schema itself. Return a Ref with the appropriate target schema or change the output declaration. | References, Call boundary, Ref |
|
| A function declares a mutable Ref output but returns an immutable Ref view. Return a mutable Ref view or declare an immutable reference output. | References, Views, Call boundary | |
| A function with a Ref output returns a known Ref targeting an object owned by its own local scope. Return a Ref to storage that outlives the function, or, to return the local object itself, declare a non-Ref output of that object’s schema. | References, Call boundary, Objects and values | |
A function declared to return a non-Ref object returns a Ref whose target is unknown, NIL, or outside that function's scope. Return an object of the declared schema, or declare a permitted Ref output. |
References, Call boundary | |
| At a Block boundary, or for a non-empty, non-Ref Code output, a Ref targets a sub-item of a local owned by the ending scope. Return the whole object or copy the sub-item into an independent output. | References, Objects and values, Call boundary | |
| A function returns a non-Ref object whose schema differs from the declared output schema. Return an object with the declared schema or change the output declaration. | Declared output, Schema kinds | |
| Module processing ends with one or more objects still on the data stack. Consume or use every top-level object before the module ends. | Stacks, Modules, Compiler output | |
Constructing an object calls INIT, which changes the data-stack size instead of leaving it unchanged. Make INIT leave the caller's data stack unchanged: consume any temporaries created inside INIT, not pre-existing caller objects. |
Structs, manuallyInitVariable | |
Destroying an object calls DIE, which changes the data-stack size instead of leaving it unchanged. Make DIE leave the caller's data stack unchanged: consume any temporaries created inside DIE, not pre-existing caller objects. |
Structs, manuallyDestroyVariable | |
if processes an unknown condition, and corresponding branch objects at one stack position have different schemas. Make both branches produce the same schema at every stack position. |
Stacks, if, Schema kinds |
|
loop repeats a body at runtime whose carried object at one stack position has a different schema from the corresponding input object. Keep the number and schemas of carried objects unchanged during runtime repetition. |
Stacks, loop, Schema kinds |
|
A construct needs an object that is absent: operand may designate a builtin argument, a Code input, the variadic tuple, a loop condition, New value, or New item. Push or produce the required object before invoking the construct. |
Stacks, array |
|
A construct receives an object whose schema does not meet requirement. The operand designator may name a builtin argument, Code input, variadic tuple, loop output, New value, or New item. Supply an object with the required schema. |
Stacks, Schema kinds, fieldIndex |
|
A construct requires an object whose value is known at compile time and whose schema meets requirement. The operand designator may name a builtin argument, Code input, variadic tuple, loop output, New value, or New item. Supply a compile-time-known object of the required schema, or choose an operation that accepts an unknown value. |
Known and unknown values, Stacks, fieldIndex |
|
| A source-level operation would need an empty data stack to reach an unchecked access, but the checked builtin path reports the missing operand first. Not reachable from source code in this compiler version; report it as a compiler defect. | Stacks, Diagnostics and status |
Schemas and writes
| Message | Cause and fix | See |
|---|---|---|
alignment, storageSize, newVarOfTheSameType, or set targets an operand whose dereferenced object has schema Code. Pass a non-Code target or choose an operation that permits Code. |
Code, alignment, set |
|
alignment, storageSize, newVarOfTheSameType, or set targets an operand whose dereferenced object has schema Text. Pass a non-Text target or choose an operation that permits Text. |
Text, alignment, set |
|
A same-schema operation such as and, +, =, or set receives two objects with different schemas. Supply matching schemas before applying the operation. |
Objects and values, Schema kinds, and |
|
array receives a known negative Int32 object as its count. Use zero or a positive count, or choose a path that does not require a known count. |
array, Int32, Known and unknown values |
|
callField receives an empty dictionary schema rather than a Dict with fields. Pass a non-empty Dict whose schema contains the requested field or predicate. |
callField, Dict, Structs |
|
| A field-selection or introspection operation receives a known integer ordinal outside the target Struct's field range. Use an ordinal from zero through the final field, or use a valid dynamic operation on a uniform Struct. | Structs, fieldName, fieldRead |
|
@, !, fieldRead, or fieldWrite uses an unknown ordinal with a non-uniform Struct. Make the ordinal known, or use a uniform Struct for that unknown-ordinal operation. |
Structs, Known and unknown values, fieldRead, fieldWrite |
|
fieldIndex finds no matching Dict field, or a List/Tuple is empty or was given a non-empty name. Use an existing Dict field name; for a non-empty List or Tuple, use "" to select its final item. |
Selection, fieldIndex, Struct |
|
A write operation such as !, fieldWrite, or set targets an object through an immutable view. Use a mutable Ref/view for the destination, or remove the write. |
Views, fieldWrite, set |
|
schemaName finds a static SCHEMA_NAME field of schema Text whose value is NIL. Declare it with a known, non-NIL Text object, for example SCHEMA_NAME: "Widget" virtual;, or remove the field to use the formatted-schema fallback. |
schemaName, Dict, Text |
|
.!NAME receives a Dict object instead of a Ref to the Dict as its second object. Pass a Ref view of the Dict, such as a mutable selection, before the member write. |
NameWriteMember, Views, Ref | |
.!NAME receives an immutable Ref to its second Dict object. Use a mutable Ref/view for that Dict, or do not perform the member write. |
NameWriteMember, Views, Ref | |
.!NAME cannot find the selected source-text name as a field in its second Dict object. Correct the member name or add that field to the Dict schema. |
NameWriteMember, Selection, Dict | |
.!NAME selects a private field in its second Dict object, and that field is not visible from the selecting scope. Make the field public or perform the write from the Dict that declares it. |
NameWriteMember, Names, lookup, and overloads, Selection | |
An !NAME field write selects a Dict that is not held through a Ref; this can occur in a method of a Meta Dict. Remove an unnecessary write, or, if mutable storage is intended, use a non-Meta Dict reached through a mutable Ref. |
NameWrite, Views, Ref | |
!NAME selects a Dict through an immutable Ref. Use a mutable Dict view for the write, or choose another mutable destination. |
NameWrite, Views, Dict | |
!NAME has a Block source, but its destination local is neither Block nor Code. Assign an object with the destination schema, or use a Code destination with the intended signature; a different Block schema is reported as Type mismatch. |
NameWrite, Block and Code, Schema kinds | |
!NAME assigns an immutable Ref source to a destination whose Ref view is mutable. Pass a mutable source view or declare the destination to accept an immutable Ref. |
NameWrite, Views, Ref | |
!NAME assigns a Ref source to a non-Ref destination. Use new to supply an object instead of its Ref (for example, x new !y); an immutable view copies and a mutable view moves. Alternatively, change the destination to a Ref. |
NameWrite, Views, Ref | |
A call supplies an input object whose schema differs from the corresponding Code signature input; the diagnostic shows the actual and expected schemas. Supply an object with the declared input schema or change the Code signature. |
Call boundary, call, Schema kinds |
|
!NAME or fieldWrite compares a source object with its destination and their schemas differ. Supply an object with the destination schema or change the destination declaration. |
NameWrite, Objects and values, Schema kinds | |
A named Dict-field write (!NAME or .!NAME), or a fixed-key write (! or fieldWrite), supplies a source object incompatible with the selected fixed-key Struct item. The detail lines repeat the source, Struct, and selected item with the printed caption Field «name» or Item number. Supply a source with the required schema, reference kind, and view. |
NameWrite, NameWriteMember, Objects and values, !, fieldWrite |
|
A named Dict-field write (!NAME or .!NAME), or a fixed-key write (! or fieldWrite), supplies an immutable Ref for a mutable-reference fixed item. The detail lines repeat the source, Struct, and selected item with the printed caption Field «name» or Item number. Pass a mutable Ref view or make the target item immutable. |
NameWrite, NameWriteMember, Views, !, fieldWrite |
|
A named Dict-field write (!NAME or .!NAME), or a fixed-key write (! or fieldWrite), supplies a Ref for a non-Ref fixed item. The detail lines repeat the source, Struct, and selected item with the printed caption Field «name» or Item number. Write the referenced object itself or change the target item to a Ref. |
NameWrite, NameWriteMember, Views, !, fieldWrite |
|
! or fieldWrite uses a dynamic key on a uniform Struct and supplies an incompatible source object; the message also shows formatted source and Struct data. Use a source compatible with the uniform field schema. |
Structs, !, fieldWrite |
|
! or fieldWrite uses a dynamic key on a uniform Struct whose fields are mutable Refs, but the source is an immutable Ref; the message also shows formatted source and Struct data. Pass a mutable Ref view or use a target whose uniform fields are immutable. |
Structs, Views, ! |
|
! or fieldWrite uses a dynamic key on a uniform Struct with non-Ref fields, but the source is a Ref; the message also shows formatted source and Struct data. Write the referenced object itself or make the uniform fields Refs. |
Structs, Views, ! |
References, locals and lifetime
| Message | Cause and fix | See |
|---|---|---|
An operation that requires Text—textSize, textSplit, &, =, <, >, has, def, fieldIndex, use, attribute, call, ucall, callField, exportFunction, importFunction, importVariable, printCompilerMessage, or raiseStaticError—receives a Text object whose known value is NIL. Supply a non-NIL Text. A NIL Ref is reported as operand is referenced by NIL; a NIL Code as operand is a NIL Code. |
Known and unknown values, textSize, call | |
call receives a Code object whose known value is NIL. Assign a Block or function to the Code object before calling it, or do not call a signature-only codeRef object. |
Block and Code, call | |
const or unconst receives an object whose schema is not Code, Meta, Ref, or Text. Apply the conversion to a permitted object; for an In-place object, first use a Ref view, or remove the conversion. |
Locations, references, and views, const | |
| A Code Block refers to a solid field of a Dict defined outside the current function. Make the field static or Meta, pass the data as a function input, or keep the access in the enclosing Block. | Block and Code, Structs | |
| A name use would refer to a local after its scope ended, but normal scope cleanup removes that name before this condition can be observed. Not reachable from source code in this compiler version; report it as a compiler defect. | Call boundary and inline processing, Names, lookup, and overloads | |
| A Code Block refers to a non-static local from an enclosing function. Pass the runtime data as a Code input, or use a Meta or static local instead of capturing a solid local. | Block and Code, Call boundary and inline processing | |
call supplies an immutable Ref to a Code input that requires a mutable Ref. The diagnostic identifies that input from the Code signature: a signature with one input prints an empty label as Input «», while a signature with two or more inputs prints the input's signature label. Pass a mutable view such as @NAME, or declare the input to accept an immutable Ref. |
Locations, references, and views, Call boundary and inline processing, call | |
call supplies a Ref to a Managed target where the Code input expects a value object. Pass a value object, such as one produced by new, or declare the Code input as a Ref. |
Call boundary and inline processing, Structs, call | |
A copy operation such as new, set, or an applicable array path would copy a Struct whose schema is both Meta and Managed, including when it is nested in another Struct. Do not copy that Meta Managed object, or remove managed lifetime behavior if it should be pure Meta. |
Meta objects, Structs, new | |
A copy operation such as new, set, or an applicable array path reaches a managed Struct with a DIE field but no ASSIGN field. Add a compatible ASSIGN field, or avoid copying the object. |
Structs, Locations, references, and views, new | |
set, new, or a related copy/move operation reaches a known source or destination Ref whose target location is invalid. Initialize the storage and pass a valid Ref rather than NIL or an invalid location. |
Locations, references, and views, set, Known and unknown values | |
| A Block assigns a Ref to one of its own local objects into a captured reference that survives the Block. Keep the target in the enclosing scope, or move or return the owning object before binding a reference to it. | Call boundary and inline processing, Locations, references, and views, Stable and unstable objects | |
| A Block output would retain a second Ref to a Managed object after that whole object has already moved to the parent scope. Not reachable from source code in this compiler version; report it as a compiler defect. | Call boundary and inline processing, Structs, Locations, references, and views | |
| A Struct's unnamed item is a Ref to an object owned by the ending local scope. Return or copy the item object, or return the whole owning object instead of retaining a reference into that scope. | Call boundary and inline processing, Structs, Locations, references, and views | |
| A Struct field named name is a Ref to an object owned by the ending local scope. Return or copy the field object, or return the whole owning object instead of retaining a reference into that scope. | Call boundary and inline processing, Structs, Locations, references, and views | |
A move operation such as new, set, or an applicable array path would move a Struct whose schema is both Meta and Managed. Do not move that object; remove managed lifetime behavior from the Meta schema or keep the object in place. |
Meta objects, Structs, new | |
An operation dereferences a known NIL Ref; arithmetic and field reads are examples. Initialize or bind the Ref to a target, or test for NIL before the operation. |
Locations, references, and views, Known and unknown values, new | |
new receives an In-place or other non-Meta object instead of a Block, Meta object, or Ref. Give it a Block, Meta object, or Ref view, or use an operation suited to the source schema. |
Locations, references, and views, Block and Code, new | |
Constructing a managed Struct finds a DIE field but no INIT field. Add an INIT field with no data-stack effect, or remove DIE and the managed lifetime. |
Structs, new |
Known values and compile-time limits
| Message | Cause and fix | See |
|---|---|---|
storageAddress, addressToReference, or importVariable requires runtime storage but receives a Meta object; @, !, fieldRead, or fieldWrite uses an unknown ordinal on a Meta Struct; or a Code signature declares a non-empty Meta output. Supply a non-Meta runtime object, use a known ordinal, or declare a non-Meta output. |
Meta, Objects and values, storageAddress, exportFunction |
|
call or ucall receives Text whose value is unknown, so the source to process cannot be selected at compile time. Make the Text object's value known or use a Block. |
Known and unknown values, call, ucall |
|
loop statically unrolls more iterations than the configured limit (256 by default). Make the loop terminate sooner, make it dynamic, or raise the compiler limit. |
loop, Compiler options, Known and unknown values |
|
Static loop processing revisits the same compiled state at two iterations, so the known loop state makes no progress. Change the body's known inputs or state, or use a dynamic loop with a runtime termination condition. |
loop, Known and unknown values, Stacks |
|
/ or mod receives a known zero divisor. Supply or prove a nonzero divisor before the compile-time operation. |
Known and unknown values, /, mod |
|
/ or mod evaluates the minimum signed integer divided by -1 at compile time. Avoid that pair, widen the computation, or guard the divisor or operand before the operation. |
Known and unknown values, /, mod |
|
A Block that calls itself by name, or nested compile-time processing through ucall or uif, can reach the configured call-depth limit (1024 by default). A finite recursion with a known terminating condition can compile; unbounded or runtime-dependent recursion cannot. Write such a recursive function as a module-level Code (f: {n: Int32;} Int32 {} codeRef; then [...] !f; see Block and Code), replace the recursion with loop, or raise the limit with -callDepthLimit. |
Call boundary, ucall, Compiler options |
|
The Number node receives an Intx literal outside the selected target-width signed range. Use a literal within the target range or compile for a width that can represent it. |
Intx, Compiler options | |
The Number node receives a Natx literal outside the selected target-width unsigned range. Use a literal within the target range or compile for a width that can represent it. |
Natx, Compiler options | |
A virtual declaration marks a candidate object static even though its schema is Managed. Do not make that object static, or remove its managed lifetime behavior. |
Structs, Known and unknown values, virtual |
|
A virtual declaration marks a candidate object static even though its value or a nested object's value is not completely known at compile time. Use known static data, or keep the variable non-static. |
Known and unknown values, virtual, Views |
|
A virtual declaration would require a known non-NIL Code object, but ordinary source constructs provide either a NIL Code object or a non-completely-known Code object. Not reachable from source code in this compiler version; report it as a compiler defect. |
Known and unknown values, Block and Code, virtual |
|
A virtual declaration marks a candidate object containing a non-NIL Ref. Use a NIL Ref for static data, store the referenced object itself, or keep the reference non-static. |
Known and unknown values, Views, virtual |
|
A named Dict-field write (!NAME or .!NAME), or a fixed-key write (! or fieldWrite), targets a static Struct item with a fixed key. The detail lines repeat the source, Struct, and selected item with the printed caption Field «name» or Item number. Write to a non-static item or change the schema instead of assigning to static data. |
NameWrite, NameWriteMember, Known and unknown values, !, fieldWrite |
|
< or > compares Text objects whose value is not known at compile time. Make both Text values known, or load algorithm and use its runtime lexicographic < or > overload. |
Known and unknown values, <, > |
Declarations, specifiers and signatures
| Message | Cause and fix | See |
|---|---|---|
attribute is applied while the current scope already has a pending text attribute. Apply one attribute before the text it decorates, and do not set another until that text consumes the pending attribute. |
Processing, attribute |
|
exportFunction or importFunction is invoked below module level. Move the declaration to module scope. |
Modules, exportFunction, importFunction |
|
A declaration follows a pending static specifier set by virtual, but exportFunction, importFunction, or importVariable does not accept it. Remove virtual or apply it only to a declaration that accepts it. |
Names, lookup, and overloads, exportFunction, importFunction, importVariable |
|
exportFunction or importFunction declares a name whose existing declaration has a different computed signature. Use one signature for that name or choose a different name. |
Names, lookup, and overloads, Call boundary, exportFunction, importFunction |
|
exportFunction declares a function name and signature that already has a definition. Define the function once or choose a different name. |
Names, lookup, and overloads, exportFunction |
|
overload, private, or virtual is used while the same pending specifier is already set. Use each specifier once before the declaration that consumes it. |
Names, lookup, and overloads, overload, private, virtual |
|
ucall receives a callable object with a schema other than Block or Text. Use ucall with a Block or known Text; use call for a callable Dict with a CALL field or a non-NIL Code. |
Call boundary, ucall, call |
|
A call to a variadic Code object receives a non-empty List or Tuple whose schema is Meta. Supply non-Meta variadic items, or () when no additional arguments are intended. |
Meta, Call boundary, codeRef |
|
A call to a variadic Code object receives a List or Tuple whose item schema is Meta. Ensure every variadic item has a non-Meta schema. |
Meta, Call boundary, codeRef |
|
Scope processing ends with a pending overload specifier that no declaration consumed. Put overload immediately before the name declaration it should mark. |
Names, lookup, and overloads, overload |
|
Scope processing ends with a pending private specifier that no declaration consumed. Put private before the field or name declaration it should mark. |
Names, lookup, and overloads, private |
|
Scope processing ends with a pending virtual specifier that no declaration consumed. Put virtual before the declaration it should make static. |
Names, lookup, and overloads, virtual |
|
The scope ends without creating a known, non-NIL Text object to consume its pending attribute. Create such a Text in the same scope after attribute, typically with a Text literal; merely reading an existing Text local does not consume it. |
Processing, attribute |
|
A Code-signature declaration receives an input Dict with a static field name. Remove virtual from the input field declaration. |
Call boundary, Names, lookup, and overloads, exportFunction |
|
codeRef, exportFunction, or importFunction receives an input Dict with a Meta field name. Declare that input with a non-Meta schema. |
Meta, Call boundary, exportFunction |
|
| Nonfatal: a Code signature has a Text input; compilation continues. Verify that Text is intentional, or change the descriptor and all callers to the non-Text representation the interface requires. | Signature inputs, Known and unknown values | |
| Nonfatal: a Code signature has a Text result; compilation continues. Verify that Text is intentional, or change the descriptor and all callers to the non-Text representation the interface requires. | Signature descriptors, Known and unknown values | |
A codeRef, exportFunction, or importFunction declaration gives supported option name the wrong schema. Use the required schema: Text for convention and Cond for variadic. |
Options, exportFunction | |
A Code-signature declaration marks supported option name static. Remove virtual from the option field declaration. |
Options, virtual |
|
| A Code-signature declaration gives a supported option whose value is not known at compile time. Supply a known option value. | Options, Known and unknown values | |
A Code-signature declaration gives a Text option whose known value is NIL. Supply a non-NIL Text option. |
Options, Text |
|
A Code-signature declaration includes an option field other than convention or variadic. Remove that field or use one of those supported option names. |
Options, exportFunction | |
A reserved Dict hook is not a Block: CALL during invocation, PRE during guarded lookup, INIT during construction, DIE during destruction, or ASSIGN during copying. Define the indicated hook as a Block with its required stack contract. |
Selection, Dict, Structs, Names, lookup, and overloads, call |
|
importVariable is preceded by an overload specifier, which that declaration does not accept. Remove overload from the import-variable declaration. |
Names, lookup, and overloads, importVariable |
Modules, files and parsing
| Message | Cause and fix | See |
|---|---|---|
The use builtin receives a module descriptor that ends with a dot, so its symbol component is empty. Remove the trailing dot or add a symbol name after it. |
Modules, use, Source and module paths | |
After removing an optional .symbol suffix, the module path in the use descriptor is empty, as in "" or ".value". Supply the module path before the optional symbol suffix, for example "p.value". |
Modules, use, Source and module paths | |
The use builtin requests file while that module is already loading through the same dependency chain. Break the cycle by moving shared definitions to a third module or changing the use direction. |
Modules, Source and module paths, use | |
The use builtin first requests file from a nested compile-time scope instead of module level. Move the first use to module level and pass the resulting name or object into the nested Block. |
Modules, Call boundary and inline processing, use | |
mplc cannot load a primary source file or a module requested by use. Check the filename or descriptor, search directories, and read access. |
Source and module paths, Modules, use | |
Nonfatal: with -detectRedundantUses, mplc did not observe use of the imported binding. Remove the import only after reviewing whether it is needed; this note alone does not make compilation fail. |
Compiler options, Modules | |
mplc could not save LLVM IR at the -o path. Create the parent directory, check write access, or choose a writable file path; an existing writable file with different contents is overwritten. |
Output, Diagnostics and status |
Parse errors
Each row below is the parser payload that follows its source coordinates; the shared Parse error line is retained for lookup.
| Message | Cause and fix | See |
|---|---|---|
MPL syntax is invalid in a source or module file, in Text processed by call or ucall, or in a -D definition. For a file, edit the reported file; for call or ucall, inspect the supplied Text at its own reported coordinates (the path may be <BASE>), and for generated <BASE> source, correct the command-line definition. |
Source and module paths, Text, Diagnostics and status | |
| The source contains a byte sequence that the UTF-8 decoder rejects. Save the source as valid UTF-8 or replace the invalid byte sequence. | Diagnostics and status | |
| A Text hex escape ends before the next required hex digit. Complete the escaped UTF-8 byte sequence and close the literal. | Text | |
| A Text hex escape contains a character outside 0–9 and A–F. Replace it with the required hexadecimal digit. | Text | |
| A backslash at the end of the source has no escape character after it. Finish the escape and close the Text literal. | Text | |
| The character following a Text backslash is not a supported escape or the start of a hex escape. Use a supported escape, or remove the backslash if the character should be literal. | Text | |
| Hex escapes decode to an invalid UTF-8 sequence. Encode the intended Unicode character with a valid UTF-8 byte sequence. | Text | |
| A closing delimiter has no open matching construct. Add the opener or remove the extra closer. | Block, Dict, Tuple | |
| The closing delimiter has a different kind from the innermost opener. Use its matching closer and preserve nesting order. | Block, Dict, Tuple | |
| A .@ member-read prefix has no following name. Put the intended member name immediately after .@. | NameReadMember | |
| A .! member-write prefix has no following name. Put the intended member name immediately after .!. | NameWriteMember | |
| Name parsing encounters a reserved special character. Correct the name, or separate the adjacent nodes with the required delimiter. | Name | |
Strict node parsing encounters a carriage return. Use LF line endings, or -permissiveParsing if accepting carriage returns is intentional. |
Compiler options | |
| A colon appears without a preceding name. Attach it to a name label or remove it. | Label and Variable | |
| A closing Text guillemet appears without an open guillemet literal. Add the opening « or remove the extra ». | Text | |
| A number starts with zero followed by another decimal digit. Remove redundant leading zeroes or use the intended explicit number form. | Integer literals, Real literals | |
| A 0x prefix is not followed by a valid hexadecimal digit. Supply a digit in 0–9 or A–F. | Integer literals | |
A decimal integer contains an uppercase hexadecimal digit, including an uppercase E meant as the exponent marker of a real literal. Add the 0x prefix if hexadecimal was intended, use only decimal digits, or write the exponent with the lowercase e. |
Integer literals, Real literals | |
| A number contains an unexpected character. Correct the numeric spelling or separate the number from the following node. | Integer literals, Real literals | |
Strict parsing finds a space immediately before a newline. Remove that space, or use -permissiveParsing if accepting it is intentional. |
Compiler options | |
| A double-quoted Text literal reaches end of input without its closing quotation mark. Add the closing quotation mark. | Text | |
| A guillemet Text literal reaches end of input before it is closed. Balance nested guillemets and add the closing ». | Text | |
| An integer literal exceeds the parser range for its literal form. Use a fitting value or a wider explicit integer or natural suffix; target-width Intx/Natx checks have separate diagnostics. | Integer literals, Natural literals | |
| A numeric suffix is unsupported, incomplete, or followed by an invalid character. Use the complete suffix appropriate to the literal and a valid delimiter after it. | Integer literals, Natural literals, Real literals | |
| A literal written with a minus sign has a natural-number suffix. Remove the minus sign or use an appropriate signed integer suffix. | Integer literals, Natural literals | |
| A literal beginning with 0x is being parsed as a Real number. Write the Real in decimal form or use a hexadecimal integer form. | Real literals | |
| The decimal point in a Real literal is not followed by a decimal digit. Supply a fractional digit, for example 1.0 rather than 1.. | Real literals | |
| A multi-digit Real exponent begins with zero. Remove the redundant exponent zeroes or use a single zero exponent. | Real literals | |
| The exponent marker and optional sign are not followed by a decimal digit. Supply the exponent digits. | Real literals | |
| The magnitude of the written exponent exceeds the parser limit of 308. Use an exponent that the parser accepts and a value representable in the requested Real schema. | Real literals | |
| Conversion to the requested Real32/Real64 fails after lexical parsing; an out-of-range value can cause this, as with 9e308. Use a representable Real literal. | Real literals | |
| An opening delimiter is still open at end of input. Close the construct with its matching delimiter. | Block, Dict, Tuple |
Program-requested failures
These entries describe failure mechanisms selected by the program; ordinary compiler-message and stack-printing builtins produce program-directed output instead.
| Message | Cause and fix | See |
|---|---|---|
A visible raiseStaticError call supplies a known, non-NIL Text as the diagnostic message; the program or library defines its contents rather than mplc. Locate the call and satisfy or correct the precondition. |
raiseStaticError | |
The program explicitly requests immediate compilation termination. Find the failCompilation call and correct the condition that reaches it, or remove an accidental call. |
failCompilation |
Command line
These diagnostics are printed before any source is read; the process status is 2.
| Message | Cause and fix | See |
|---|---|---|
| The supplied limit argument is an empty string. Supply an integral limit from 0 through 2,147,483,647. | Compiler options | |
| The supplied limit argument is an empty string. Supply an integral limit from 0 through 2,147,483,647. | Compiler options | |
| The limit does not produce an accepted numeric value (NaN is also rejected by the source check). Supply an integral numeric limit. | Compiler options | |
| The limit does not produce an accepted numeric value (NaN is also rejected by the source check). Supply an integral numeric limit. | Compiler options | |
| The parsed numeric limit fails the range check. Use an integer from 0 through 2,147,483,647. | Compiler options | |
| The parsed numeric limit fails the range check. Use an integer from 0 through 2,147,483,647. | Compiler options | |
| The accepted numeric limit is not integral. Supply an integer instead of a fractional value. | Compiler options | |
| The accepted numeric limit is not integral. Supply an integer instead of a fractional value. | Compiler options | |
The -D option has no definition argument. Supply the definition after -D: NAME or NAME=MPL_SOURCE. |
Compiler options | |
The -I option has no folder argument. Supply the source-search directory after -I. |
Compiler options | |
The -callDepthLimit option has no argument. Supply a non-negative integral limit from 0 through 2,147,483,647. |
Compiler options | |
The -callTrace option has no argument. Supply the intended trace argument, normally 0 or 1. |
Compiler options | |
-debug follows -ndebug, but the flags are mutually exclusive. Keep only the mode you intend. |
Compiler options | |
The -hidePrefix option has no prefix argument. Supply the path prefix after -hidePrefix. |
Compiler options | |
The legacy -linker_option flag (misspelled as -linked_option in the diagnostic) has no following argument. Supply the argument or remove the flag. |
Compiler options | |
-ndebug follows -debug, but the flags are mutually exclusive. Keep only the mode you intend. |
Compiler options | |
The -o option has no output-path argument. Supply the output path after -o. |
Compiler options | |
The -staticLoopLengthLimit option has no argument. Supply a non-negative integral limit from 0 through 2,147,483,647. |
Compiler options | |
The dash-prefixed argument is not a recognized option. Correct or remove it; for version output use -version, not --version. |
Compiler options, Invocation |
Internal errors
| Message | Cause and fix | See |
|---|---|---|
An internal invariant check of the compiler failed; such checks are active only in compiler builds with DEBUG. This is not a rule of the program. Preserve the complete diagnostic, compiler version, and a small reproducer, and report a compiler defect. |
Diagnostics and status | |
| The compiler encounters an invalid node marker that the MPL parser cannot produce. Not reachable from source code in this compiler version; report it as a compiler defect. | Diagnostics and status, Processing model, Node table |