Documentation

ImportGraph.Shake.EnvExtension

Shake extension API #

This module provides basic API wrappers and boilerplate for shake extensions. This is mainly for readability, to ensure that the correct aspects of the state are being managed: different extensions use different parts of the state for specific purposes.

In particular, it provides withFreshShakeRecords for running an action after resetting the shake extension state, allowing for capture of what mod uses that action produced.

@[inline]

Resets the new entries in the indirectModUse extension. Note that the state is never altered in the course of the file, as it only represents imported entries. Only the entries are gotten/ reset.

Instances For

    Gets and resets the new indirect mod uses recorded in the indirectModUse extension. Note that the state per se is never altered in the course of the file, as it only represents imported entries. Only the entries list is gotten/reset.

    Instances For
      @[inline]

      A wrapper for extraModUses.toEnvExtension.asyncMode to allow it to appear as an optParam in a public-facing type.

      Instances For

        Gets and resets the new extra mod uses in the extraModUses extension. Note that the state does not include imported entries.

        Instances For
          @[inline]

          A wrapper for isExtraRevModUseExt.toEnvExtension.asyncMode to allow it to appear as an optParam in a public-facing type.

          Instances For
            @[inline]

            Gets the state of the extraModUses extension.

            Instances For
              @[inline]

              Resets the state of the extraModUses extension.

              Instances For
                @[inline]

                Resets the state of the extraModUses extension.

                Instances For
                  @[inline]

                  Merges the state of the extraModUses extension (using "or" semantics).

                  Instances For

                    Gets and resets the state of the extraModUses extension.

                    Instances For

                      Erases any new shake records from the current module.

                      Instances For

                        Copies new extra mod uses from src and adds them to dest. Does not erase extra mod uses already in dest. The same as Lean.copyExtraModUses, but passes async modes.

                        Instances For

                          Copies new indirect mod uses from src and adds them to dest. Does not erase extra mod uses already in dest.

                          Instances For

                            Copies a new rev mod use from src to dest, preserving the one in dest if present.

                            Instances For
                              @[inline]

                              Copies all new shake records from src to dest. Does not erase the entries in dest.

                              Instances For
                                def ImportGraph.Shake.withFreshShakeRecords {m : Type → Type} [Monad m] [Lean.MonadEnv m] [MonadFinally m] {α : Type} (x : m α) :
                                m α

                                Resets the shake extension entries (the records from the current module), then restores them after running the given action, merging any new records into the new ones.

                                Instances For