The areas / V01. The language of Mathlib
Mathlib.Util.GetAllModules
2 declarations. Mathlib docs · Source
Utility functions for finding all .lean files or modules in a project.
TODO:
getLeanLibs contains a hard-coded choice of which dependencies should be built and which ones
should not. Could this be made more structural and robust, possibly with extra Lake support?
def getAllFiles E1 #
Bool → String → IO (Array System.FilePath)
getAllFiles git ml takes all .lean files in the directory ml
(recursing into sub-directories) and returns the Array of Strings
#[file₁, ..., fileₙ]
of all their file names. These are not sorted in general.
The input git is a Boolean flag:
truemeans that the command usesgit ls-filesto find the relevant files;falsemeans that the command recursively scans all dirs searching for.leanfiles.
def getAllModulesSorted E1 #
Bool → String → IO (Array String)
Like getAllFiles, but return an array of module names instead,
i.e. names of the form Mathlib/Algebra/Algebra/Basic.lean.
In addition, these names are sorted in a platform-independent order.