Skip to content
Snippets Groups Projects
  1. Jan 28, 2023
    • Zubin's avatar
      bindist configure: Fail if find not found (#22691) · c9967d13
      Zubin authored and Marge Bot's avatar Marge Bot committed
      c9967d13
    • Simon Peyton Jones's avatar
      Accept an orphan declaration (sadly) · 15750d33
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      This accepts the orphan type family instance
      
        type instance DsForeignHook = ...
      
      in GHC.HsToCore.Types.
      
      See Note [The Decoupling Abstract Data Hack] in GHC.Driver.Hooks
      15750d33
    • Simon Peyton Jones's avatar
      Avoid orphans in the parser · 0f25a13b
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      This moves Anno instances for PatBuilder from GHC.Parser.PostProcess
      to GHC.Parser.Types to avoid orphans.
      0f25a13b
    • Simon Peyton Jones's avatar
      Avoid orphans in STG · faa300fb
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      This patch removes some orphan instances in the STG namespace
      by introducing the GHC.Stg.Lift.Types module, which allows various
      type family instances to be moved to GHC.Stg.Syntax, avoiding orphan
      instances.
      faa300fb
    • Simon Peyton Jones's avatar
      Report family instance orphans correctly · 46a53bb2
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      This fixes the fact that we were not reporting orphan family instances
      at all. The fix here is easy, but touches a bit of code. I refactored
      the code to be much more similar to the way that class instances are done:
      
         - Add a fi_orphan field to FamInst, like the is_orphan field in ClsInst
         - Make newFamInst initialise this field, just like newClsInst
         - And make newFamInst report a warning for an orphan, just like newClsInst
         - I moved newFamInst from GHC.Tc.Instance.Family to GHC.Tc.Utils.Instantiate,
           just like newClsInst.
         - I added mkLocalFamInst to FamInstEnv, just like mkLocalClsInst in InstEnv
         - TcRnOrphanInstance and SuggestFixOrphanInstance are now parametrised
           over class instances vs type/data family instances.
      
      Fixes #19773
      46a53bb2
    • Simon Peyton Jones's avatar
      Detect family instance orphans correctly · 638277ba
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      We were treating a type-family instance as a non-orphan if there
      was a type constructor on its /right-hand side/ that was local. Boo!
      Utterly wrong. With this patch, we correctly check the /left-hand side/
      instead!
      
      Fixes #22717
      638277ba
  2. Jan 27, 2023
  3. Jan 26, 2023
  4. Jan 25, 2023
  5. Jan 24, 2023
    • Cheng Shao's avatar
      CmmToC: fix CmmRegOff for 64-bit register on a 32-bit target · d151546e
      Cheng Shao authored and Marge Bot's avatar Marge Bot committed
      We used to print the offset value to a platform word sized integer.
      This is incorrect when the offset is negative (e.g. output of cmm
      constant folding) and the register is 64-bit but on a 32-bit target,
      and may lead to incorrect runtime result (e.g. #22607).
      
      The fix is simple: just treat it as a proper MO_Add, with the correct
      width info inferred from the register itself.
      
      Metric Increase:
          T12707
          T13379
          T4801
          T5321FD
          T5321Fun
      d151546e
    • Tom Ellis's avatar
      Clarify where `f` is defined · 05e6a2d9
      Tom Ellis authored and Marge Bot's avatar Marge Bot committed
      05e6a2d9
    • Matthew Pickering's avatar
      Add test for T22671 · 1c050ed2
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      This was fixed by b13c6ea5
      
      Closes #22671
      1c050ed2
    • Krzysztof Gogolewski's avatar
      Fix Lint check for duplicate external names · 34d2d463
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      Lint was checking for duplicate external names by calling removeDups,
      which needs a comparison function that is passed to Data.List.sortBy.
      But the comparison was not a valid ordering - it returned LT
      if one of the names was not external.
      For example, the previous implementation won't find a duplicate in
      [M.x, y, M.x].
      Instead, we filter out non-external names before looking for duplicates.
      34d2d463
    • Matthew Pickering's avatar
      Debug: Print full NodeKey when pretty printing ModuleGraphNode · be701cc6
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      This is helpful when debugging multiple component issues.
      be701cc6
    • Matthew Pickering's avatar
      Finder: Look in current unit before looking in any home package dependencies · ada29f5c
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      In order to preserve existing behaviour it's important to look within the current component before consideirng a module might come from an external component.
      
      This already happened by accident in `downsweep`, (because roots are used to repopulated the cache) but in the `Finder` the logic was the wrong way around.
      
      Fixes #22680
      
      -------------------------
      Metric Decrease:
          MultiComponentModules
          MultiComponentModulesRecomp
      -------------------------p
      ada29f5c
    • Matthew Pickering's avatar
      Key ModSummary cache by UnitId as well as FilePath · 4fe9eaff
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      Multiple units can refer to the same files without any problem. Just
      another assumption which needs to be updated when we may have multiple
      home units.
      
      However, there is the invariant that within each unit each file only
      maps to one module, so as long as we also key the cache by UnitId then
      we are all good.
      
      This led to some confusing behaviour in GHCi when reloading,
      multipleHomeUnits_shared distils the essence of what can go wrong.
      
      Fixes #22679
      4fe9eaff
    • Matthew Pickering's avatar
      Improve driver diagnostic messages by including UnitId in message · 06cc0a95
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      Currently the driver diagnostics don't give any indication about which unit they correspond to.
      
      For example `-Wmissing-home-modules` can fire multiple times for each different home unit and gives no indication about which unit it's actually reporting about.
      
      Perhaps a longer term fix is to generalise the providence information away from a SrcSpan so that these kind of whole project errors can be reported with an accurate provenance. For now we can just include the `UnitId` in the error message.
      
      Fixes #22678
      06cc0a95
Loading