summaryrefslogtreecommitdiff
path: root/compiler/GHC/Unit/Module.hs
Commit message (Collapse)AuthorAgeFilesLines
* Remove IndefiniteSylvain Henry2021-10-221-1/+1
| | | | We no longer need it after previous IndefUnitId refactoring.
* Lint the compiler for extraneous LANGUAGE pragmasHécate2020-10-101-8/+5
|
* Add HomeUnit typeSylvain Henry2020-08-131-5/+0
| | | | | | | | | | | | | | | | | | | | | | | Since Backpack the "home unit" is much more involved than what it was before (just an identifier obtained with `-this-unit-id`). Now it is used in conjunction with `-component-id` and `-instantiated-with` to configure module instantiations and to detect if we are type-checking an indefinite unit or compiling a definite one. This patch introduces a new HomeUnit datatype which is much easier to understand. Moreover to make GHC support several packages in the same instances, we will need to handle several HomeUnits so having a dedicated (documented) type is helpful. Finally in #14335 we will also need to handle the case where we have no HomeUnit at all because we are only loading existing interfaces for plugins which live in a different space compared to units used to produce target code. Several functions will have to be refactored to accept "Maybe HomeUnit" parameters instead of implicitly querying the HomeUnit fields in DynFlags. Having a dedicated type will make this easier. Bump haddock submodule
* Remove ClosureUnitInfoMapSylvain Henry2020-06-131-10/+0
|
* Clean up boot vs non-boot disambiguating typesJohn Ericson2020-06-041-7/+5
| | | | | | | | | | | | | | | We often have (ModuleName, Bool) or (Module, Bool) pairs for "extended" module names (without or with a unit id) disambiguating boot and normal modules. We think this is important enough across the compiler that it deserves a new nominal product type. We do this with synnoyms and a functor named with a `Gen` prefix, matching other newly created definitions. It was also requested that we keep custom `IsBoot` / `NotBoot` sum type. So we have it too. This means changing many the many bools to use that instead. Updates `haddock` submodule.
* Unit: split and rename modulesSylvain Henry2020-04-301-0/+151
Introduce GHC.Unit.* hierarchy for everything concerning units, packages and modules. Update Haddock submodule