Documentation

Common.Diagnostics.Registry

Every diagnostic code the compiler can emit, with the stage that emits it and a one-line summary. This is the only place a number is bound to a meaning: each CompilerDiagnostic instance names an entry here (Diagnostics.unexpectedToken.code) rather than writing a literal, so a code that a diagnostic uses but the registry does not list cannot exist.

Numbers are allocated sequentially and are permanent: never renumbered, never reused. A diagnostic that disappears keeps its entry, marked retired, so an old build log or an old fugue explain E0042 stays meaningful. Add new diagnostics at the end.

fugue explain <code> prints docs/diagnostics/<code>.md; the summary here is what fugue explain --list shows, and what the regression runner's coverage report labels a code with.

One diagnostic's registry entry.

  • Its code.

  • stage : Stage

    The stage that emits it.

  • warningName : String

    The -W<name> this is filtered under. Warnings only; empty for an error, which -W never suppresses.

  • summary : String

    One line, imperative-free: what the diagnostic means, not how to fix it (that is what docs/diagnostics/<code>.md is for).

Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Lexing #

      Parser_'s lexer rejected a character.

      Equations
      Instances For

        Parsing #

        Parser_'s parser rejected a token.

        Equations
        Instances For

          Annotation resolution #

          @type/@mailbox/@parameter given the wrong number of arguments.

          Equations
          Instances For

            An annotation's argument is not the kind of thing that annotation takes.

            Equations
            Instances For

              A @type annotation's payload does not parse as a type.

              Equations
              Instances For

                An annotation's payload does not parse as an expression.

                Equations
                Instances For

                  @mailbox was not given a var[e₁, …, eₙ]-shaped expression.

                  Equations
                  Instances For

                    Desugaring #

                    @ used outside an EXCEPT update.

                    Equations
                    Instances For

                      goto somewhere other than the end of its statement list.

                      Equations
                      Instances For

                        A statement with no label reachable above it.

                        Equations
                        Instances For

                          A label inside a with body.

                          Equations
                          Instances For

                            A while inside a with body.

                            Equations
                            Instances For

                              A while not immediately preceded by a label.

                              Equations
                              Instances For

                                An if/either that needs a label after it and does not have one.

                                Equations
                                Instances For

                                  A write to a with-bound name.

                                  Equations
                                  Instances For

                                    An annotation of the wrong kind for the site it sits at.

                                    Equations
                                    Instances For

                                      The same annotation twice on one site.

                                      Equations
                                      Instances For

                                        Two assignments to the same variable in one atomic block.

                                        Equations
                                        Instances For

                                          A record field access whose field is not an identifier.

                                          Equations
                                          Instances For

                                            EXTENDS resolution #

                                            EXTENDS names a module no search path provides.

                                            Equations
                                            Instances For

                                              EXTENDS names a module found in more than one place.

                                              Equations
                                              Instances For

                                                EXTENDS forms a cycle.

                                                Equations
                                                Instances For

                                                  Type checking #

                                                  Placeholder for a checking rule with no named diagnostic yet.

                                                  Equations
                                                  Instances For

                                                    A name with no binding in scope.

                                                    Equations
                                                    Instances For

                                                      Two types that do not convert.

                                                      Equations
                                                      Instances For

                                                        A type annotation is required and absent.

                                                        Equations
                                                        Instances For

                                                          A type could not be inferred.

                                                          Equations
                                                          Instances For

                                                            A set was expected.

                                                            Equations
                                                            Instances For

                                                              A record was expected.

                                                              Equations
                                                              Instances For

                                                                Indexing into something that cannot be indexed.

                                                                Equations
                                                                Instances For

                                                                  A record field that the record type does not have.

                                                                  Equations
                                                                  Instances For

                                                                    A tuple index outside the tuple's range, or not a literal.

                                                                    Equations
                                                                    Instances For

                                                                      An operator was expected.

                                                                      Equations
                                                                      Instances For

                                                                        An operator applied to the wrong number of arguments.

                                                                        Equations
                                                                        Instances For

                                                                          A type that stayed ambiguous.

                                                                          Equations
                                                                          Instances For

                                                                            A function was expected.

                                                                            Equations
                                                                            Instances For

                                                                              A tuple was expected.

                                                                              Equations
                                                                              Instances For

                                                                                A higher-order parameter used at an arity its declared type does not have.

                                                                                Equations
                                                                                Instances For

                                                                                  A channel was expected.

                                                                                  Equations
                                                                                  Instances For

                                                                                    print given something with no printable form.

                                                                                    Equations
                                                                                    Instances For

                                                                                      A value that cannot be sent over a channel.

                                                                                      Equations
                                                                                      Instances For

                                                                                        A metavariable left unconstrained at the end of checking.

                                                                                        Equations
                                                                                        Instances For

                                                                                          Well-formedness #

                                                                                          A goto to a label no process defines.

                                                                                          Equations
                                                                                          Instances For

                                                                                            Done redefined as an ordinary label.

                                                                                            Equations
                                                                                            Instances For

                                                                                              Two declarations of one name in one scope.

                                                                                              Equations
                                                                                              Instances For

                                                                                                An inner declaration shadowing an outer one.

                                                                                                Equations
                                                                                                Instances For

                                                                                                  A channel value inside an ordinary expression.

                                                                                                  Equations
                                                                                                  Instances For

                                                                                                    A variables entry with a channel type.

                                                                                                    Equations
                                                                                                    Instances For

                                                                                                      A process declaring its own channels/fifos.

                                                                                                      Equations
                                                                                                      Instances For

                                                                                                        An algorithm-level PlusCal variables block.

                                                                                                        Equations
                                                                                                        Instances For

                                                                                                          A reference to a module-level TLA⁺ VARIABLE.

                                                                                                          Equations
                                                                                                          Instances For

                                                                                                            A temporal or action operator reachable from a statement.

                                                                                                            Equations
                                                                                                            Instances For

                                                                                                              An unbounded quantifier where a finite one is required.

                                                                                                              Equations
                                                                                                              Instances For

                                                                                                                A process receiving from more than one channel.

                                                                                                                Equations
                                                                                                                Instances For

                                                                                                                  A process set receiving from a channel shared by all of its instances.

                                                                                                                  Equations
                                                                                                                  Instances For

                                                                                                                    A process receiving without a @mailbox declaration.

                                                                                                                    Equations
                                                                                                                    Instances For

                                                                                                                      Two processes of one algorithm carrying the same name.

                                                                                                                      Equations
                                                                                                                      Instances For

                                                                                                                        Two blocks of one algorithm carrying the same label.

                                                                                                                        Equations
                                                                                                                        Instances For

                                                                                                                          Typed2Computable #

                                                                                                                          A construct with no finite runtime representation.

                                                                                                                          Equations
                                                                                                                          Instances For

                                                                                                                            An invariant Typed2Computable relies on did not hold — a compiler bug, not a program error.

                                                                                                                            Equations
                                                                                                                            Instances For

                                                                                                                              Computable2Guarded #

                                                                                                                              An invariant Computable2Guarded relies on did not hold — a compiler bug.

                                                                                                                              Equations
                                                                                                                              Instances For

                                                                                                                                Guarded2Network #

                                                                                                                                An invariant Guarded2Network relies on did not hold — a compiler bug.

                                                                                                                                Equations
                                                                                                                                Instances For

                                                                                                                                  Network2Go #

                                                                                                                                  An invariant Network2Go relies on did not hold — a compiler bug.

                                                                                                                                  Equations
                                                                                                                                  Instances For

                                                                                                                                    A well-typed construct the Go backend has no way to compile.

                                                                                                                                    Equations
                                                                                                                                    Instances For

                                                                                                                                      Module identity #

                                                                                                                                      A file whose MODULE name is not the file's own name.

                                                                                                                                      Equations
                                                                                                                                      Instances For

                                                                                                                                        Warnings #

                                                                                                                                        fair/fair+ parsed and ignored.

                                                                                                                                        Equations
                                                                                                                                        Instances For

                                                                                                                                          An annotation nothing consumes.

                                                                                                                                          Equations
                                                                                                                                          Instances For

                                                                                                                                            @parameter repeated harmlessly.

                                                                                                                                            Equations
                                                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                                                            Instances For

                                                                                                                                              Placeholder for an unnamed checker warning.

                                                                                                                                              Equations
                                                                                                                                              Instances For

                                                                                                                                                A multicast filter annotating only some of its components.

                                                                                                                                                Equations
                                                                                                                                                • One or more equations did not get rendered due to their size.
                                                                                                                                                Instances For

                                                                                                                                                  An EXTENDS-ed module with a PlusCal algorithm of its own, which EXTENDS does not carry over.

                                                                                                                                                  Equations
                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                  Instances For

                                                                                                                                                    A @mailbox declared by a process that contains no receive.

                                                                                                                                                    Equations
                                                                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                                                                    Instances For

                                                                                                                                                      A call to an unsafe representation downcast (Fugue!FunAsSeq, Fugue!SetAsFun).

                                                                                                                                                      Equations
                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                      Instances For

                                                                                                                                                        Every registered diagnostic, in code order. fugue explain --list prints this; the regression runner's coverage report walks it to find codes no fixture exercises.

                                                                                                                                                        Equations
                                                                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                                                                        Instances For

                                                                                                                                                          Every -W<name> a warning can be suppressed under, in code order. What the CLI validates -W against, so the set of accepted names is the set of warnings that exist: Entry.code has no default, so a warning cannot be emitted without an entry here to derive its name from, and a name here with no warning behind it would have nothing to suppress.

                                                                                                                                                          Equations
                                                                                                                                                          Instances For

                                                                                                                                                            The entry for code, if it is registered.

                                                                                                                                                            Equations
                                                                                                                                                            Instances For