Remove addition of Prelude import to AST
Currently, during compilation the AST of a module is extended with a "virtual" import of the Prelude
module unless the Prelude
is explicitly imported or the import is deactivated by the NoImplicitPrelude
language extension.
While the consideration of the Prelude
is important for compilation, the addition to the AST can lead to problems since the AST no longer corresponds to the source program. Thus, this transformation should at least be deferred to the transformation phases.
Involved modules are:
-
Modules
: Contains the functionimportPrelude
which should be removed -
Interfaces
: Contains the functionloadInterfaces
which then has to load thePrelude
in addition -
Imports
: Contains the functionsimportModules
andimportInterfaces
which then have to load thePrelude
in addition