Skip to content
Snippets Groups Projects
  1. Mar 27, 2024
    • Alan Zimmerman's avatar
      EPA: Do not extend declaration range for trailine zero len semi · 0acfe391
      Alan Zimmerman authored and Marge Bot's avatar Marge Bot committed
      The lexer inserts virtual semicolons having zero width.
      Do not use them to extend the list span of items in a list.
      0acfe391
    • Serge S. Gulin's avatar
      JS: `h$rts_isProfiled` is removed from `profiling` and left its version at · 13223f6d
      Serge S. Gulin authored and Marge Bot's avatar Marge Bot committed
      `rts/js/config.js`
      13223f6d
    • Rodrigo Mesquita's avatar
      Revert "NCG: Fix a bug in jump shortcutting." · cfeb70d3
      Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
      This reverts commit 5bd8ed53.
      
      Fixes #24586
      cfeb70d3
    • Rodrigo Mesquita's avatar
      bindist: Clean xattrs of bin and lib at configure time · bf65a7c3
      Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
      For issue #21506, we started cleaning the extended attributes of
      binaries and libraries from the bindist *after* they were installed to
      workaround notarisation (#17418), as part of `make install`.
      
      However, the `ghc-toolchain` binary that is now shipped with the bindist
      must be run at `./configure` time. Since we only cleaned the xattributes
      of the binaries and libs after they were installed, in some situations
      users would be unable to run `ghc-toolchain` from the bindist, failing
      at configure time (#24554).
      
      In this commit we move the xattr cleaning logic to the configure script.
      
      Fixes #24554
      bf65a7c3
    • Rodrigo Mesquita's avatar
      configure: Use LDFLAGS when trying linkers · 32a8103f
      Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
      A user may configure `LDFLAGS` but not `LD`. When choosing a linker, we
      will prefer `ldd`, then `ld.gold`, then `ld.bfd` -- however, we have to
      check for a working linker. If either of these fail, we try the next in
      line.
      
      However, we were not considering the `$LDFLAGS` when checking if these
      linkers worked. So we would pick a linker that does not support the
      current $LDFLAGS and fail further down the line when we used that linker
      with those flags.
      
      Fixes #24565, where `LDFLAGS=-Wl,-z,pack-relative-relocs` is not
      supported by `ld.gold` but that was being picked still.
      32a8103f
  2. Mar 26, 2024
  3. Mar 25, 2024
  4. Mar 23, 2024
    • Ben Gamari's avatar
      docs: Drop old release notes, add for 9.12.1 · 8d67f247
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      8d67f247
    • 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
    • Tristan Cacqueray's avatar
      docs: remove the don't use float hint · 8f7cfc7e
      Tristan Cacqueray authored and Marge Bot's avatar Marge Bot committed
      This hint is outdated, ``Complex Float`` are now specialised,
      and the heap space suggestion needs more nuance so it should
      be explained in the unboxed/storable array documentation.
      8f7cfc7e
    • 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
    • Matthew Craven's avatar
      Improve toInteger @Word32 on 64-bit platforms · 8a8ac65a
      Matthew Craven authored and Marge Bot's avatar Marge Bot committed
      On 64-bit platforms, every Word32 fits in an Int, so we can
      convert to Int# without having to perform the overflow check
      integerFromWord# uses internally.
      8a8ac65a
  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
    • Preetham Gujjula's avatar
      docs: Remove mention of non-existent Ord instance for Complex · 247fc0fa
      Preetham Gujjula authored and Marge Bot's avatar Marge Bot committed
      The documentation for Data.Complex says that the Ord instance for Complex Float
      is deficient, but there is no Ord instance for Complex a. The Eq instance for
      Complex Float is similarly deficient, so we use that as an example instead.
      247fc0fa
    • 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
    • Alan Zimmerman's avatar
      EPA: Clean up Exactprint helper functions a bit · 5f275176
      Alan Zimmerman authored and Marge Bot's avatar Marge Bot committed
      - Introduce a helper lens to compose on `EpAnn a` vs `a` versions
      - Rename some prime versions of functions back to non-prime
        They were renamed during the rework
      5f275176
  7. Mar 20, 2024
  8. Mar 19, 2024
    • Bryan R's avatar
      testsuite: Disable T21336a on wasm · 5ff88389
      Bryan R authored and Marge Bot's avatar Marge Bot committed
      5ff88389
    • Ben Gamari's avatar
      mk/relpath: Fix quoting · cf55a54b
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Previously there were two instances in this script which lacked proper
      quoting. This resulted in `relpath` invocations in the binary
      distribution Makefile producing incorrect results on Windows, leading to
      confusing failures from `sed` and the production of empty package
      registrations.
      
      Fixes #24538.
      cf55a54b
    • 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
    • Hannes Siebenhandl's avatar
      Eliminate thunk in 'IfaceTyCon' · 349ea330
      Hannes Siebenhandl authored and Marge Bot's avatar Marge Bot committed
      Heap analysis showed that `IfaceTyCon` retains a thunk to
      `IfaceTyConInfo`, defeating the sharing of the most common instances of
      `IfaceTyConInfo`.
      We make sure the indirection is removed by adding bang patterns to
      `IfaceTyCon`.
      
      Experimental results on the agda code base, where the `mi_extra_decls`
      were read from disk:
      
      Before this change, we observe around 8654045 instances of:
      
      `IfaceTyCon[Name,THUNK_1_0]`
      
      But these thunks almost exclusively point to a shared value!
      
      Forcing the thunk a little bit more, leads to `ghc-debug` reporting:
      
      `IfaceTyCon[Name:Name,IfaceTyConInfo]`
      
      and a noticeable reduction of live bytes (on agda ~10%).
      349ea330
    • 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
    • Matthew Craven's avatar
      Remove unused ghc-internal module "GHC.Internal.Constants" · da0d8ba5
      Matthew Craven authored and Marge Bot's avatar Marge Bot committed
      da0d8ba5
    • Matthew Pickering's avatar
      hadrian: Remove stage1 testsuite wrappers logic · 4c8f1794
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      Now instead of producing wrappers which pass the global package database
      argument to ghc and ghc-pkg, we write the location of the correct
      package database into the settings file so you can just use the intree
      compiler directly.
      4c8f1794
Loading