Documentation

ImportGraph.WorkspaceModel.Base

Basic Lake workspace data #

This file defines the BaseWorkspace shared by both the WorkspaceSummary, which is transported as Json across a process boundary (extracted from loading the lake workspace), and the WorkspaceModel, which is computed from the WorkspaceSummary (but doesn't need some of its fields). See ImportGraph.WorkspaceModel.WorkspaceSummary and ImportGraph.WorkspaceModel.Model.

Basic data for a lean_lib.

  • name : Lean.Name

    The library's name.

  • The directory relative to which the library's module names locate source files (absolute).

  • The library's root module names.

  • The globs specifying the library's buildable modules.

Instances For

    Basic data for a lake package. All paths are absolute.

    • baseName : Lean.Name

      The package's assigned name (Package.baseName).

    • origName : Lean.Name

      The package's original name (Package.origName).

    • wsIdx : Nat

      Lake's index for the package (Package.wsIdx) Together with baseName, this disambiguates packages.

    • The package's root directory (absolute).

    • leanLibDir : System.FilePath

      The directory holding the package's compiled module artifacts (.oleans etc.), e.g. <dir>/.lake/build/lib/lean.

    Instances For

      The prefix we use for modelling the Lean toolchain, which is simply toolchain.

      Instances For
        @[inline]

        A Lean githash as a Name for uniquely identifying the Lean toolchain.

        Instances For
          @[inline]

          Whether a name is of the form toolchain.<ver>.

          Instances For
            @[inline]

            The ToolchainVer extracted from a name of the form toolchain.<ver>.

            Instances For

              The basic data of a Lake workspace shared by both the transported WorkspaceSummary and the rich, computed WorkspaceModel.

              • The workspace root directory (absolute).

              • sysroot : System.FilePath

                The Lean toolchain's sysroot (absolute).

              • leanLibDir : System.FilePath

                The Lean toolchain's directory for its oleans (absolute), usually {sysroot}/lib/lean/.

              • lakeSrcDir : System.FilePath

                The Lean toolchain's lake source directory (absolute), usually {sysroot}/src/lean/lake/. Note that we should search here first for files, lest we confuse src/lean/lake/ with src/lean/Lake on case-insensitive filesystems.

              • leanSrcDir : System.FilePath

                The Lean toolchain's lean source directory (absolute), usually {sysroot}/src/lean/. Note that we should search lakeSrcDir first for files, lest we confuse src/lean/lake/ with src/lean/Lake on case-insensitive filesystems.

              • The Lean toolchain's version, as read from the lean-toolchain file, if possible.

              • leanGitHash : String

                The git hash of the lean version.

              • manifestFile : System.FilePath

                The path to the lake manifest. Should be uniform, but is allowed to change in lake internals, so just in case.

              Instances For