Documentation

StrataDDM.Elab.DeclM

Equations
Instances For
    @[irreducible]
    Equations
    Instances For
      @[irreducible]

      End position of a syntax tree, skipping trailing zero-width children.

      For a node with no range of its own, the end is that of its last child that covers source text, found by scanning right-to-left and skipping zero-width children. A trailing element with no concrete syntax — an absent trailing optional, or an empty-template op (op else0 () => ;) — parses to a zero-width node past the real content (on the preceding token's consumed trailing whitespace), so it must be skipped, not taken as the end. The common case is an O(1) own-info check: these nodes carry their own zero-width range (stamped by the parser). A rangeless nested op is the exception — it needs a descent to tell whether its subtree is zero-width (see lastSpanningEnd's none case).

      The skip lives here, in the descending function, so a parent reaching a nested child's end gets the corrected position at every level, e.g. if … else new C → else → new → its absent trailing type-args. mkSourceRange? is then just ⟨sourceLocPos, sourceLocEnd⟩. The i == 0 case keeps the first child's end even if empty, so a wholly-empty node still yields a position. The skip is one-sided — sourceLocPos needs no leading skip (see its comment).

      Equations
      Instances For

        Source range of a syntax tree: its start position paired with its end.

        Both bounds come from sourceLocPos / sourceLocEnd, so the trailing zero-width skip that sourceLocEnd performs is honored here for free — this is just the two positional queries combined.

        Equations
        Instances For
          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            class StrataDDM.Elab.ElabClass (m : Type → Type) extends Monad m :
            Instances
              def StrataDDM.Elab.runChecked {m : Type → Type} {α : Type} [ElabClass m] (action : m α) :
              m (α × Bool)

              Runs action and returns result along with Bool that is true if action ran without producing errors.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  def StrataDDM.Elab.logError {m : Type → Type} [ElabClass m] (loc : SourceRange) (msg : String) (isSilent : Bool := false) :
                  Equations
                  Instances For
                    def StrataDDM.Elab.logErrorMF {m : Type → Type} [ElabClass m] (loc : SourceRange) (msg : StrataFormat) (isSilent : Bool := false) (globalContext? : Option GlobalContext := none) :
                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      Instances For
                        Equations
                        Instances For

                          Represents an entity with some form of unique string name.

                          Instances
                            @[reducible, inline]
                            Equations
                            Instances For

                              Map metadata attribute names to any declarations with that name that are in the current scope.

                              Instances For

                                Map metadata attribute names to any declarations with that name that are in the current scope.

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

                                        Map metadata attribute names to any declarations with that name that are in the current scope.

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

                                                        Opens the dialect definition dialect in the parser so it is visible to parser, but not part of environment. This is used for dialect definitions.

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

                                                          Opens the dialect (not must not already be open)

                                                          Opens the dialect (not must not already be open)

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