Documentation

Lean.ExtraModUses

Infrastructure for recording extra import dependencies not implied by the environment constants for the benefit of shake.

Instances For
    Equations
    Instances For
      def Lean.recordIndirectModUse {m : TypeType} [Monad m] [MonadEnv m] [MonadTrace m] [MonadOptions m] [MonadRef m] [AddMessageContext m] (kind : String) (declName : Name) :

      Lets shake know that references to declName may also require importing the current module due to some additional metaprogramming dependency expressed by kind. Currently this is always the name of an attribute applied to declName, which is not from the current module, in the current module. kind is not currently used to further filter what references to declName require importing the current module but may in the future.

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

        Additional import dependency for elaboration.

        • module : Name

          Dependency's module name.

        • isExported : Bool

          Whether dependency must be imported as public.

        • isMeta : Bool

          Whether dependency must be imported as meta.

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

                Returns additional recorded import dependencies of the given module.

                Equations
                Instances For

                  Copies additional recorded import dependencies from one environment to another.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    def Lean.recordExtraModUse {m : TypeType} [Monad m] [MonadEnv m] [MonadTrace m] [MonadOptions m] [MonadRef m] [AddMessageContext m] (modName : Name) (isMeta : Bool) :

                    Records an additional import dependency for the current module, using Environment.isExporting as the visibility level.

                    NOTE: Directly recording a module name does not trigger including indirect dependencies recorded via recordIndirectModUse, prefer recordExtraModUseFromDecl instead.

                    Equations
                    Instances For
                      def Lean.recordExtraModUseFromDecl {m : TypeType} [Monad m] [MonadEnv m] [MonadTrace m] [MonadOptions m] [MonadRef m] [AddMessageContext m] (declName : Name) (isMeta : Bool) :

                      Records the module of the given declaration as an additional import dependency for the current module, using Environment.isExporting as the visibility level. If the declaration itself is already meta, the module dependency is recorded as a non-meta dependency.

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

                        Checks whether this module should be preserved as an import by shake.

                        Equations
                        Instances For

                          Records this module to be preserved as an import by shake.

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