Documentation

Lake.Build.Store

The Lake Build Store #

The Lake build store is the map of Lake build keys to build task and/or build results that is slowly filled during a recursive build (e.g., via topological-based build of an initial key's dependencies).

Pure State #

@[reducible, inline]

The type of the Lake build store.

Equations
Instances For
    @[inline]

    Returns a new empty build store.

    Equations
    Instances For

      Atomic Mutable Reference #

      @[reducible, inline]

      A mutable reference to the Lake build store.

      Equations
      Instances For
        @[inline]

        Creates a new mutable build store.

        Equations
        Instances For
          @[inline]

          Atomically applies a pure modification to the build store.

          Equations
          Instances For
            @[inline]

            Atomically applies a pure modification to the build store and returns the paired value.

            Equations
            Instances For
              @[inline]

              Reads the current value of the build store, returning a snapshot of its state.

              Equations
              Instances For
                @[inline]

                Atomically returns a projection of current value of the build store.

                Equations
                Instances For
                  @[inline]

                  Atomically returns the build store's saved job for the build key k, if any. Otherwise, returns none.

                  Equations
                  Instances For
                    @[inline]

                    Atomically inserts a new build job into the build store. Does nothing if one already exists.

                    Equations
                    Instances For
                      @[inline]
                      def Lake.BuildStoreRef.fetchOrCreate {m : Type → Type u_1} {α : Type} [Monad m] [MonadLiftT BaseIO m] (k : BuildKey) [FamilyDef BuildData k α] (create : m (Job α)) (r : BuildStoreRef) :
                      m (Job α)

                      Returns the value of k in the store if it exists. Otherwise, runs create to generate it, stores it, and returns the result.

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

                        Monadic Interaction #

                        @[reducible, inline]
                        abbrev Lake.BuildStoreT (m : Type → Type u_1) (α : Type) :
                        Type u_1

                        Transformer to equip a monad with a mutable Lake build store.

                        An internal monad. Not intended for user use.

                        Equations
                        Instances For
                          @[inline]
                          def Lake.BuildStoreT.run {m : Type → Type u_1} {α : Type} [Monad m] [MonadLiftT BaseIO m] (s : BuildStore := ∅) (x : BuildStoreT m α) :
                          m (α × BuildStore)

                          - Runs the monadic action x over the build store s, returning the monadic result paired with the final state of the build store.

                          Equations
                          Instances For
                            @[reducible, inline]
                            abbrev Lake.MonadBuildStore (m : Type → Type u_1) :
                            Type u_1

                            Type class for monads equipped with a Lake build store.

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