Skip to content
Snippets Groups Projects
  1. Apr 03, 2024
    • Duncan Coutts's avatar
      Accept changes to base-exports · 1adc6fa4
      Duncan Coutts authored and Marge Bot's avatar Marge Bot committed
      All the changes are in fact not changes at all.
      
      Previously, the IoSubSystem data type was defined in GHC.RTS.Flags and
      exported from both GHC.RTS.Flags and GHC.IO.SubSystem. Now, the data
      type is defined in GHC.IO.SubSystem and still exported from both
      modules.
      
      Therefore, the same exports and same instances are still available from
      both modules. But the base-exports records only the defining module, and
      so it looks like a change when it is fully compatible.
      
      Related: we do add a deprecation to the export of the type via
      GHC.RTS.Flags, telling people to use the export from GHC.IO.SubSystem.
      
      Also the sort order for some unrelated Show instances changed. No idea
      why.
      
      The same changes apply in the other versions, with a few more changes
      due to sort order weirdness.
      1adc6fa4
    • Simon Peyton Jones's avatar
      Deal with duplicate tyvars in type declarations · faa30b41
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      GHC was outright crashing before this fix: #24604
      faa30b41
    • Sylvain Henry's avatar
      JS: fix h$appendToHsString implementation (#24495) · 527616e9
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      h$appendToHsString needs to wrap its argument in an updatable thunk
      to behave like unpackAppendCString#. Otherwise if a SingleEntry thunk is
      passed, it is stored as-is in a CONS cell, making the resulting list
      impossible to deepseq (forcing the thunk doesn't update the contents of
      the CONS cell)!
      
      The added test checks that the optimization kicks in and that
      h$appendToHsString works as intended.
      
      Fix #24495
      527616e9
  2. Apr 02, 2024
  3. Mar 27, 2024
  4. Mar 23, 2024
    • Andreas Klebinger's avatar
      NCG: Fix a bug in jump shortcutting. · 5bd8ed53
      Andreas Klebinger authored and Marge Bot's avatar Marge Bot committed
      When checking if a jump has more than one destination account for the
      possibility of some jumps not being representable by a BlockId.
      
      We do so by having isJumpishInstr return a `Maybe BlockId` where Nothing
      represents non-BlockId jump destinations.
      
      Fixes #24507
      5bd8ed53
    • Simon Peyton Jones's avatar
      Print more info about kinds in error messages · b72705e9
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      This fixes #24553, where GHC unhelpfully said
      
        error: [GHC-83865]
          • Expected kind ‘* -> * -> *’, but ‘Foo’ has kind ‘* -> * -> *’
      
      See Note [Showing invisible bits of types in error messages]
      b72705e9
    • Apoorv Ingle's avatar
      Fix for #24552 (see testcase T24552) · 0c48f2b9
      Apoorv Ingle authored and Marge Bot's avatar Marge Bot committed
      Fixes for a bug in desugaring pattern synonyms matches, introduced
      while working on  on expanding `do`-blocks in #18324
      
      The `matchWrapper` unecessarily (and incorrectly) filtered out the
      default wild patterns in a match. Now the wild pattern alternative is
      simply ignored by the pm check as its origin is `Generated`.
      The current code now matches the expected semantics according to the language spec.
      0c48f2b9
  5. Mar 22, 2024
  6. Mar 21, 2024
    • Andrei Borzenkov's avatar
      Fix TH handling in `pat_to_type_pat` function (#24571) · 6fafc51e
      Andrei Borzenkov authored and Marge Bot's avatar Marge Bot committed
      There was missing case for `SplicePat` in `pat_to_type_at` function,
      hence patterns with splicing that checked against `forall->` doesn't work
      properly because they fall into the "illegal pattern" case.
      
      Code example that is now accepted:
      
        g :: forall a -> ()
        g $([p| a |]) = ()
      6fafc51e
    • Vladislav Zavialov's avatar
      Type operators in promoteOccName (#24570) · da2a10ce
      Vladislav Zavialov authored and Marge Bot's avatar Marge Bot committed
      Type operators differ from term operators in that they are lexically
      classified as (type) constructors, not as (type) variables.
      
      Prior to this change, promoteOccName did not account for this
      difference, causing a scoping issue that affected RequiredTypeArguments.
      
        type (!@#) = Bool
        f = idee (!@#)      -- Not in scope: ‘!@#’  (BUG)
      
      Now we have a special case in promoteOccName to account for this.
      da2a10ce
  7. Mar 20, 2024
  8. Mar 19, 2024
    • Krzysztof Gogolewski's avatar
      Minor misc cleanups · 594bee0b
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      - GHC.HsToCore.Foreign.JavaScript: remove dropRuntimeRepArgs;
        boxed tuples don't take RuntimeRep args
      - GHC.HsToCore.Foreign.Call: avoid partial pattern matching
      - GHC.Stg.Unarise: strengthen the assertion; we can assert that
        non-rubbish literals are unary rather than just non-void
      - GHC.Tc.Gen.HsType: make sure the fsLit "literal" rule fires
      - users_guide/using-warnings.rst: remove -Wforall-identifier,
        now deprecated and does nothing
      - users_guide/using.rst: fix formatting
      - andy_cherry/test.T: remove expect_broken_for(23272...), 23272 is fixed
      
      The rest are simple cleanups.
      594bee0b
    • Matthew Craven's avatar
      CorePrep: Rework lowering of BigNat# literals · b56d2761
      Matthew Craven authored and Marge Bot's avatar Marge Bot committed
      Don't use bigNatFromWord#, because that's terrible:
       * We shouldn't have to traverse a linked list at run-time
         to build a BigNat# literal. That's just silly!
       * The static List object we have to create is much larger
         than the actual BigNat#'s contents, bloating code size.
       * We have to read the corresponding interface file,
         which causes un-tracked implicit dependencies. (#23942)
      
      Instead, encode them into the appropriate platform-dependent
      sequence of bytes, and generate code that copies these bytes
      at run-time from an Addr# literal into a new ByteArray#.
      A ByteArray# literal would be the correct thing to generate,
      but these are not yet supported; see also #17747.
      
      Somewhat surprisingly, this change results in a slight
      reduction in compiler allocations, averaging around 0.5%
      on ghc's compiler performance tests, including when compiling
      programs that contain no bignum literals to begin with.
      The specific cause of this has not been investigated.
      
      Since this lowering no longer reads the interface file for
      GHC.Num.BigNat, the reasoning in Note [Depend on GHC.Num.Integer]
      is obsoleted.  But the story of un-tracked built-in dependencies
      remains complex, and Note [Tracking dependencies on primitives]
      now exists to explain this complexity.
      
      Additionally, many empty imports have been modified to refer to
      this new note and comply with its guidance.  Several empty imports
      necessary for other reasons have also been given brief explanations.
      
      Metric Decrease:
          MultiLayerModulesTH_OneShot
      b56d2761
    • Hannes Siebenhandl's avatar
      Escape multiple arguments in the settings file · 31bf85ee
      Hannes Siebenhandl authored and Marge Bot's avatar Marge Bot committed
      Uses responseFile syntax.
      
      The issue arises when GHC is installed on windows into a location that
      has a space, for example the user name is 'Fake User'.
      The $topdir will also contain a space, consequentially.
      When we resolve the top dir in the string `-I$topdir/mingw/include`,
      then `words` will turn this single argument into `-I/C/Users/Fake` and
      `User/.../mingw/include` which trips up the flag argument parser of
      various tools such as gcc or clang.
      We avoid this by escaping the $topdir before replacing it in
      `initSettngs`.
      Additionally, we allow to escape spaces and quotation marks for
      arguments in `settings` file.
      
      Add regression test case to count the number of options after variable
      expansion and argument escaping took place.
      Additionally, we check that escaped spaces and double quotation marks are
      correctly parsed.
      31bf85ee
    • Alan Zimmerman's avatar
      EPA: Address more 9.10.1-alpha1 regressions from recent changes · bd8209eb
      Alan Zimmerman authored and Marge Bot's avatar Marge Bot committed
      Closes #24533
      Hopefully for good this time
      bd8209eb
  9. Mar 14, 2024
  10. Mar 12, 2024
  11. Mar 11, 2024
  12. Mar 10, 2024
  13. Mar 09, 2024
  14. Mar 08, 2024
Loading