1. 13 Jun, 2020 1 commit
  2. 10 Jun, 2020 1 commit
  3. 04 Jun, 2020 1 commit
    • John Ericson's avatar
      Clean up boot vs non-boot disambiguating types · 32a4ae90
      John Ericson authored
      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.
      32a4ae90
  4. 21 May, 2020 1 commit
  5. 04 May, 2020 1 commit
  6. 01 May, 2020 1 commit
    • Sylvain Henry's avatar
      Fully remove PprDebug · de9fc995
      Sylvain Henry authored
      PprDebug was a pain to deal with consistently as it is implied by
      `-dppr-debug` but it isn't really a PprStyle. We remove it completely
      and query the appropriate SDoc flag instead (`sdocPprDebug`) via
      helpers (`getPprDebug` and its friends).
      de9fc995
  7. 30 Apr, 2020 5 commits
    • Sylvain Henry's avatar
      Unit: split and rename modules · 8bfb0219
      Sylvain Henry authored
      Introduce GHC.Unit.* hierarchy for everything concerning units, packages
      and modules.
      
      Update Haddock submodule
      8bfb0219
    • Sylvain Henry's avatar
      Refactoring unit management code · 10d15f1e
      Sylvain Henry authored
      Over the years the unit management code has been modified a lot to keep
      up with changes in Cabal (e.g. support for several library components in
      the same package), to integrate BackPack, etc. I found it very hard to
      understand as the terminology wasn't consistent, was referring to past
      concepts, etc.
      
      The terminology is now explained as clearly as I could in the Note
      "About Units" and the code is refactored to reflect it.
      
      -------------------
      
      Many names were misleading: UnitId is not an Id but could be a virtual
      unit (an indefinite one instantiated on the fly), IndefUnitId
      constructor may contain a definite instantiated unit, etc.
      
         * Rename IndefUnitId into InstantiatedUnit
         * Rename IndefModule into InstantiatedModule
         * Rename UnitId type into Unit
         * Rename IndefiniteUnitId constructor into VirtUnit
         * Rename DefiniteUnitId constructor into RealUnit
         * Rename packageConfigId into mkUnit
         * Rename getPackageDetails into unsafeGetUnitInfo
         * Rename InstalledUnitId into UnitId
      
      Remove references to misleading ComponentId: a ComponentId is just an
      indefinite unit-id to be instantiated.
      
         * Rename ComponentId into IndefUnitId
         * Rename ComponentDetails into UnitPprInfo
         * Fix display of UnitPprInfo with empty version: this is now used for
           units dynamically generated by BackPack
      
      Generalize several types (Module, Unit, etc.) so that they can be used
      with different unit identifier types: UnitKey, UnitId, Unit, etc.
      
         * GenModule: Module, InstantiatedModule and InstalledModule are now
           instances of this type
         * Generalize DefUnitId, IndefUnitId, Unit, InstantiatedUnit,
           PackageDatabase
      
      Replace BackPack fake "hole" UnitId by a proper HoleUnit constructor.
      
      Add basic support for UnitKey. They should be used more in the future to
      avoid mixing them up with UnitId as we do now.
      
      Add many comments.
      
      Update Haddock submodule
      10d15f1e
    • Sylvain Henry's avatar
      Refactor UnitInfo load/store from databases · 9e2c8e0e
      Sylvain Henry authored
      Converting between UnitInfo stored in package databases and UnitInfo as
      they are used in ghc-pkg and ghc was done in a very convoluted way (via
      BinaryStringRep and DbUnitModuleRep type classes using fun deps, etc.).
      It was difficult to understand and even more to modify (I wanted to
      try to use a GADT for UnitId but fun deps got in the way).
      
      The new code uses much more straightforward functions to convert between
      the different representations. Much simpler.
      9e2c8e0e
    • Sylvain Henry's avatar
      Remove unused `emptyGenericUnitInfo` · 69562e34
      Sylvain Henry authored
      69562e34
    • Sylvain Henry's avatar
      Refactor UnitInfo · 10a2ba90
      Sylvain Henry authored
      * Rename InstalledPackageInfo into GenericUnitInfo
      
      The name InstalledPackageInfo is only kept for alleged backward
      compatibility reason in Cabal. ghc-boot has its own stripped down copy
      of this datatype but it doesn't need to keep the name. Internally we
      already use type aliases (UnitInfo in GHC, PackageCacheFormat in
      ghc-pkg).
      
      * Rename UnitInfo fields: add "unit" prefix and fix misleading names
      
      * Add comments on every UnitInfo field
      
      * Rename SourcePackageId into PackageId
      
      "Package" already indicates that it's a "source package". Installed
      package components are called units.
      
      Update Haddock submodule
      10a2ba90
  8. 26 Apr, 2020 1 commit