This should be a much more sophisticated abstraction than it is. Currently
it's just a bit of data about the compiler, like its flavour and name and
version. The reason it's just data is because currently it has to be in
Read and Show so it can be saved along with the LocalBuildInfo. The
only interesting bit of info it contains is a mapping between language
extensions and compiler command line flags. This module also defines a
PackageDB type which is used to refer to package databases. Most compilers
only know about a single global package collection but GHC has a global and
per-user one and it lets you create arbitrary other package databases. We do
not yet fully support this latter feature.
Make a CompilerInfo of which only the known information is its CompilerId,
its AbiTag and that it does not claim to be compatible with other
compiler id's.
Some compilers have a notion of a database of available packages.
For some there is just one global db of packages, other compilers
support a per-user or an arbitrary db specified at some location in
the file system. This can be used to build isolated environments of
packages, for example to build a collection of related packages
without installing them globally.
We typically get packages from several databases, and stack them
together. This type lets us be explicit about that stacking. For example
typical stacks include:
Some compilers support emitting debug info. Some have different
levels. For compilers that do not the level is just capped to the
level they do support.
Does this compiler's "ar" command support llvm-ar's -L flag,
which compels the archiver to add an input archive's members
rather than adding the archive itself.
Some compilers (notably GHC) support profiling and can instrument
programs so the system can account costs to different functions. There are
different levels of detail that can be used for this accounting.
For compilers that do not support this notion or the particular detail
levels, this is either ignored or just capped to some similar level
they do support.