Skip to content
Snippets Groups Projects
  1. Jan 31, 2023
    • Matthew Pickering's avatar
      ci: Remove FreeBSD job from release pipelines · de963cb6
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      We no longer attempt to build or distribute this release
      de963cb6
    • Simon Peyton Jones's avatar
      Take account of loop breakers in specLookupRule · d0f34f25
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      The key change is that in GHC.Core.Opt.Specialise.specLookupRule
      we were using realIdUnfolding, which ignores the loop-breaker
      flag.  When given a loop breaker, rule matching therefore
      looped infinitely -- #22802.
      
      In fixing this I refactored a bit.
      
      * Define GHC.Core.InScopeEnv as a data type, and use it.
        (Previously it was a pair: hard to grep for.)
      
      * Put several functions returning an IdUnfoldingFun into
        GHC.Types.Id, namely
           idUnfolding
           alwaysActiveUnfoldingFun,
           whenActiveUnfoldingFun,
           noUnfoldingFun
        and use them.  (The are all loop-breaker aware.)
      d0f34f25
    • Ryan Scott's avatar
      Fix two bugs in TypeData TH reification · 2f145052
      Ryan Scott authored and Marge Bot's avatar Marge Bot committed
      This patch fixes two issues in the way that `type data` declarations were
      reified with Template Haskell:
      
      * `type data` data constructors are now properly reified using `DataConI`.
        This is accomplished with a special case in `reifyTyCon`. Fixes #22818.
      
      * `type data` type constructors are now reified in `reifyTyCon` using
        `TypeDataD` instead of `DataD`. Fixes #22819.
      2f145052
    • Ryan Scott's avatar
      Handle `type data` properly in tyThingParent_maybe · 20598ef6
      Ryan Scott authored and Marge Bot's avatar Marge Bot committed
      Unlike most other data constructors, data constructors declared with `type data`
      are represented in `TyThing`s as `ATyCon` rather than `ADataCon`. The `ATyCon`
      case in `tyThingParent_maybe` previously did not consider the possibility of
      the underlying `TyCon` being a promoted data constructor, which led to the
      oddities observed in #22817. This patch adds a dedicated special case in
      `tyThingParent_maybe`'s `ATyCon` case for `type data` data constructors to fix
      these oddities.
      
      Fixes #22817.
      20598ef6
    • Andreas Klebinger's avatar
      ghc-the-library: Retain cafs in both static in dynamic builds. · 08ba8720
      Andreas Klebinger authored and Marge Bot's avatar Marge Bot committed
      We use keepCAFsForGHCi.c to force -fkeep-cafs behaviour by using a
      __attribute__((constructor)) function.
      
      This broke for static builds where the linker discarded the object file
      since it was not reverenced from any exported code. We fix this by
      asserting that the flag is enabled using a function in the same module
      as the constructor. Which causes the object file to be retained by the
      linker, which in turn causes the constructor the be run in static builds.
      
      This changes nothing for dynamic builds using the ghc library. But causes
      static to also retain CAFs (as we expect them to).
      
      Fixes #22417.
      
      -------------------------
      Metric Decrease:
          T21839r
      -------------------------
      08ba8720
  2. Jan 30, 2023
    • Cheng Shao's avatar
      compiler: fix data section alignment in the wasm NCG · da468391
      Cheng Shao authored and Marge Bot's avatar Marge Bot committed
      Previously we tried to lower the alignment requirement as far as
      possible, based on the section kind inferred from the CLabel. For info
      tables, .p2align 1 was applied given the GC should only need the
      lowest bit to tag forwarding pointers. But this would lead to
      unaligned loads/stores, which has a performance penalty even if the
      wasm spec permits it. Furthermore, the test suite has shown memory
      corruption in a few cases when compacting gc is used.
      
      This patch takes a more conservative approach: all data sections
      except C strings align to word size.
      da468391
    • Ben Gamari's avatar
      nativeGen: Disable asm-shortcutting on Darwin · 8bed166b
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Asm-shortcutting may produce relative references to symbols defined in
      other compilation units. This is not something that MachO relocations
      support (see #21972). For this reason we disable the optimisation on
      Darwin. We do so without a warning since this flag is enabled by `-O2`.
      
      Another way to address this issue would be to rather implement a
      PLT-relocatable jump-table strategy. However, this would only benefit
      Darwin and does not seem worth the effort.
      
      Closes #21972.
      8bed166b
  3. Jan 28, 2023
  4. Jan 27, 2023
    • Matthew Pickering's avatar
      Revert "base: NoImplicitPrelude in Data.Void and Data.Kind" · 545bf8cf
      Matthew Pickering authored
      Fixes CI errors of the form.
      
      ```
      ===> Command failed with error code: 1
      ghc: panic! (the 'impossible' happened)
        GHC version 9.7.20230127:
      	lookupGlobal
        Failed to load interface for ‘GHC.Num.BigNat’
        There are files missing in the ‘ghc-bignum’ package,
        try running 'ghc-pkg check'.
        Use -v (or `:set -v` in ghci) to see a list of the files searched for.
        Call stack:
            CallStack (from HasCallStack):
              callStackDoc, called at compiler/GHC/Utils/Panic.hs:189:37 in ghc:GHC.Utils.Panic
              pprPanic, called at compiler/GHC/Tc/Utils/Env.hs:154:32 in ghc:GHC.Tc.Utils.Env
        CallStack (from HasCallStack):
          panic, called at compiler/GHC/Utils/Error.hs:454:29 in ghc:GHC.Utils.Error
      Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug
      ```
      
      This reverts commit d0d7ba0f.
      
      The module now lacks a dependency on GHC.Num.BigNat which it implicitly
      depends on. It is causing all CI jobs to fail so we revert without haste
      whilst the patch can be fixed.
      
      Fixes #22848
      545bf8cf
    • Andrei Borzenkov's avatar
      Replace errors from badOrigBinding with new one (#22839) · 2648c09c
      Andrei Borzenkov authored and Marge Bot's avatar Marge Bot committed
      Problem: in 02279a9c the type-level [] syntax was changed from a built-in name
      to an alias for the GHC.Types.List constructor. badOrigBinding assumes that if
      a name is not built-in then it must have come from TH quotation, but this is
      not necessarily the case with [].
      
      The outdated assumption in badOrigBinding leads to incorrect error messages.
      This code:
        data []
      Fails with "Cannot redefine a Name retrieved by a Template Haskell quote: []"
      
      Unfortunately, there is not enough information in RdrName to directly determine
      if the name was constructed via TH or by the parser, so this patch changes the
      error message instead.
      
      It unifies TcRnIllegalBindingOfBuiltIn and TcRnNameByTemplateHaskellQuote
      into a new error TcRnBindingOfExistingName and changes its wording to avoid
      guessing the origin of the name.
      2648c09c
    • Ben Gamari's avatar
      rts: Use C11-compliant static assertion syntax · e480fbc2
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Previously we used `static_assert` which is only available in C23. By
      contrast, C11 only provides `_Static_assert`.
      
      Fixes #22777
      e480fbc2
    • Sylvain Henry's avatar
      Fix spurious change from !9568 · 6932cfc7
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      6932cfc7
    • Ben Gamari's avatar
      base: Make changelog proposal references more consistent · c7116b10
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Addresses #22773.
      c7116b10
    • Matthew Pickering's avatar
      rel-eng: Add missing rocky8 bindist · 807310a1
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      We intend to release rocky8 bindist so the fetching script needs to know
      about them.
      807310a1
    • Matthew Pickering's avatar
      ci: Add ubuntu18_04 nightly and release jobs · fa1db923
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      This adds release jobs for ubuntu18_04 which uses glibc 2.27 which is
      older than the 2.28 which is used by Rocky8 bindists.
      
      Ticket #22268
      fa1db923
    • Vladislav Zavialov's avatar
      base: NoImplicitPrelude in Data.Void and Data.Kind · d0d7ba0f
      Vladislav Zavialov authored and Marge Bot's avatar Marge Bot committed
      This change removes an unnecessary dependency on Prelude
      from two modules in the base package.
      d0d7ba0f
Loading