lean2js

Lean2Js.Gather

source

What a package is made of #

The constants a package's namespace declares, in the order they were written, and the program built out of them. The order matters twice: a call has to reach a declaration already emitted, which is what Cost.progOk asks, and everything else keeps the order the author wrote so that the generated module reads like the source.

def

Lean2Js.Core.Dsl.declNameFor

source

The declaration read out of a def the package ships.

Equations
Instances For
    Used by
      def

      Lean2Js.Core.Dsl.certificateNameFor

      source

      The certificate for a def the package ships.

      Equations
      Instances For
        Used by
          opaque

          Lean2Js.Core.Dsl.shipAttr

          source

          The defs a package ships. Marking one reads the declaration out of it, so a declaration reaches the program only through the walk that proves what it denotes: there is no way to put an AST into a program by hand.

          @[ship internal] ships the declaration without putting it in the API: other declarations call it, and it is named by neither the exports of index.js nor index.d.ts. It is the way to keep a helper out of the published surface without paying @[expand]'s fuel at every call site. The word is not private: Lean's own private takes the name out of the namespace, so the walk never sees the def at all, and it is what keeps a scaffolding lemma from shipping as a claim.

          The mark is not @[export] either: Lean's own @[export] names a C symbol. A declaration taking a function stays internal whatever is written above it, because its type says so (Decl.isPublic).

          Used by
            def

            Lean2Js.Core.Dsl.isShipped

            source

            Whether n is one of the defs the package ships.

            Equations
            Instances For
              Used by
                def

                Lean2Js.Core.Dsl.namespaceMembers

                source

                The constants a package is made of: those declared directly in ns, in the order they were written. Private ones and the ones Lean generates are left out, which is how a helper stays out of the package.

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

                    Lean2Js.Core.Dsl.evalProgram

                    source
                    @[implemented_by _private.Lean2Js.Gather.0.Lean2Js.Core.Dsl.evalProgramUnsafe]
                    Used by
                      structure

                      Lean2Js.Core.Dsl.Shipped

                      source

                      One shipped def: the def itself, the declaration read out of it, and what that declaration is.

                      Instances For
                        Used by
                          def

                          Lean2Js.Core.Dsl.shipped

                          source

                          What ns ships, ordered so that every call goes backwards and otherwise in the order the defs were written.

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

                              Lean2Js.Core.Dsl.shippedTypes

                              source

                              The types ns declares, which are the ones deriving Enc wrote a TypeDef for.

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

                                  Lean2Js.Core.Dsl.«termProgram%»

                                  source

                                  Everything ns ships, above this point. The declarations are ordered so that every call goes backwards, and otherwise kept in the order they were written.

                                  Equations
                                  Instances For
                                    Used by