Skip to content
Snippets Groups Projects
  1. May 03, 2020
  2. May 01, 2020
  3. Apr 30, 2020
    • Matthew Pickering's avatar
      Hadrian: Improve tool-args command to support more components · 014ef4a3
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      There is a new command to hadrian, tool:path/to/file.hs, which returns
      the options needed to compile that file in GHCi.
      
      This is now used in the ghci script with argument `ghc/Main.hs` but its
      main purpose is to support the new multi-component branch of ghcide.
      014ef4a3
    • Simon Peyton Jones's avatar
      Mark rule args as non-tail-called · 19b701c2
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      This was just an omission...b I'd failed to call markAllNonTailCall on
      rule args.  I think this bug has been here a long time, but it's quite
      hard to trigger.
      
      Fixes #18098
      19b701c2
    • Simon Peyton Jones's avatar
      Add tests for #17873 · 5bdfdd13
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      5bdfdd13
    • Alexis King's avatar
      Document BlockArguments/LambdaCase support in arrow notation · f4d3773c
      Alexis King authored and Marge Bot's avatar Marge Bot committed
      f4d3773c
    • Alexis King's avatar
      Allow LambdaCase to be used as a command in proc notation · a48cd2a0
      Alexis King authored and Marge Bot's avatar Marge Bot committed
      a48cd2a0
    • Alexis King's avatar
      Allow block arguments in arrow control operators · 71484b09
      Alexis King authored and Marge Bot's avatar Marge Bot committed
      Arrow control operators have their own entries in the grammar, so they
      did not cooperate with BlockArguments. This was just a minor oversight,
      so this patch adjusts the grammar to add the desired behavior.
      
      fixes #18050
      71484b09
    • Sylvain Henry's avatar
      Unit: split and rename modules · 8bfb0219
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      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 and Marge Bot's avatar Marge Bot committed
      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
      Factorize mungePackagePaths code · ea717aa4
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      This patch factorizes the duplicated code used in ghc-pkg and in GHC to
      munge package paths/urls.
      
      It also fixes haddock-html munging in GHC (allowed to be either a file
      or a url) to mimic ghc-pkg behavior.
      ea717aa4
    • Sylvain Henry's avatar
      Refactor UnitInfo load/store from databases · 9e2c8e0e
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      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 and Marge Bot's avatar Marge Bot committed
      69562e34
    • Sylvain Henry's avatar
      Refactor UnitInfo · 10a2ba90
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      * 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
    • Sylvain Henry's avatar
      Document backpack fields in DynFlags · 2cfc4ab9
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      2cfc4ab9
  4. Apr 28, 2020
    • Ryan Scott's avatar
      Make boxed 1-tuples have known keys · 518a63d4
      Ryan Scott authored and Marge Bot's avatar Marge Bot committed
      Unlike other tuples, which use special syntax and are "known" by way
      of a special `isBuiltInOcc_maybe` code path, boxed 1-tuples do not
      use special syntax. Therefore, in order to make sure that the
      internals of GHC are aware of the `data Unit a = Unit a` definition
      in `GHC.Tuple`, we give `Unit` known keys. For the full details, see
      `Note [One-tuples] (Wrinkle: Make boxed one-tuple names have known keys)`
      in `GHC.Builtin.Types`.
      
      Fixes #18097.
      518a63d4
    • Ryan Scott's avatar
      Define a Quote IO instance · 4b9764db
      Ryan Scott authored and Marge Bot's avatar Marge Bot committed
      Fixes #18103.
      4b9764db
    • Alp Mestanogullari's avatar
      hadrian: always capture both stdout and stderr when running a builder fails · c62271a2
      Alp Mestanogullari authored and Marge Bot's avatar Marge Bot committed
      The idea being that when a builder('s command) fails, we quite likely want to
      have all the information available to figure out why. Depending on the builder
      _and_ the particular problem, the useful bits of information can be printed
      on stdout or stderr.
      
      We accomplish this by defining a simple wrapper for Shake's `cmd` function,
      that just _always_ captures both streams in case the command returns a non-zero
      exit code, and by using this wrapper everywhere in `hadrian/src/Builder.hs`.
      
      Fixes #18089.
      c62271a2
    • Sylvain Henry's avatar
      TH: fix Show/Eq/Ord instances for Bytes (#16457) · 99823ed2
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      We shouldn't compare pointer values but the actual bytes.
      99823ed2
  5. Apr 26, 2020
  6. Apr 24, 2020
    • John Ericson's avatar
      Switch order on `GhcMake.IsBoot` · b0fbfc75
      John Ericson authored and cgibbard's avatar cgibbard committed
      In !1798 we were requested to replace many `Bool`s with this data type.
      But those bools had `False` meaning `NotBoot`, so the `Ord` instance
      would be flipped if we use this data-type as-is.
      
      Since the planned formally-`Bool` occurrences vastly outnumber the
      current occurrences, we figured it would be better to conform the `Ord`
      instance to how the `Bool` is used now, fixing any issues, rather than
      fix them currently with the bigger refactor later in !1798. That way,
      !1798 can be a "pure" refactor with no behavioral changes.
      b0fbfc75
  7. Apr 23, 2020
Loading