Documentation

ImportGraph.Shake.Core

shake core types #

This file copies types and functions from Lake.CLI.Shake wholesale in order to make them public, with some modifications to Needs in order to suit our purposes (namely, we benefit from keeping track of private dependence in order to uniformly handle declarations from the same file, whereas shake can get away with handling import all specially.)

More utilities on these types are defined in ImportGraph.Shake.Basic.

Bitset #

This section is copied without modification, and should be removed if Shake API becomes public.

We use Nat as a bitset for doing efficient set operations. The bit indexes will usually be a module index.

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

          Needs and NeedsKind #

          This section is modified from shake's version to allow us to reason about import alls in the import hierarchy instead of dynamically.

          An "atomic" visibility dependency. Note that we consider an inclusion of the public scope and an inclusion of the private scope to be two separate dependencies. Modules may be related by multiple VisibilityKinds; the presence of any VisibilityKind implies some dependency between the modules.

          • isExported : Bool

            Represents a need for public (meta)? import: an import of the public scope of the source into the public scope of the target. false means that the public scope of the source is instead imported into the private scope of the target.

          • isAll : Bool

            Represents a need for (meta)? import all: an import of the private scope into the private scope. false means the private scope of the source is not accessed.

          • not_isExported_and_isAll : ¬(self.isExported = true ∧ self.isAll = true)
          Instances For
            Equations
            Instances For
              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                Equations
                Instances For
                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    @[reducible, match_pattern, inline]
                    Equations
                    Instances For
                      @[reducible, match_pattern, inline]
                      Equations
                      Instances For
                        @[reducible, match_pattern, inline]
                        Equations
                        Instances For

                          An "atomic" module dependency. Note that we consider an inclusion of the public scope and an inclusion of the private scope to be two separate dependencies. Modules may be related by multiple NeedsKinds; the presence of any NeedsKind implies some dependency between the modules.

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

                                                      Assumes that ¬(imp.isExported ∧ imp.importAll).

                                                      Equations
                                                      Instances For

                                                        An import effecting a NeedsKind.

                                                        Equations
                                                        Instances For

                                                          Logically, a map NeedsKind → Set <modules>.

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

                                                              An abbreviation for Needs, but intended to express what is provided to a given scope. Notably, we expect this to be both transitively closed and linearized (i.e., to have also taken public ⊆ private into account) but do not enforce this for ease of building up Provides.

                                                              Equations
                                                              Instances For
                                                                Equations
                                                                Instances For
                                                                  @[inline]
                                                                  Equations
                                                                  Instances For
                                                                    @[inline]
                                                                    Equations
                                                                    Instances For
                                                                      @[inline]

                                                                      Whether needs has the given VisibilityKind at either phase.

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