Skip to content
Snippets Groups Projects
  1. May 06, 2023
  2. May 05, 2023
  3. May 04, 2023
    • Ryan Scott's avatar
      Fix type variable substitution in gen_Newtype_fam_insts · e8b72ff6
      Ryan Scott authored and Marge Bot's avatar Marge Bot committed
      Previously, `gen_Newtype_fam_insts` was substituting the type variable binders
      of a type family instance using `substTyVars`, which failed to take type
      variable dependencies into account. There is similar code in
      `GHC.Tc.TyCl.Class.tcATDefault` that _does_ perform this substitution properly,
      so this patch:
      
      1. Factors out this code into a top-level `substATBndrs` function, and
      2. Uses `substATBndrs` in `gen_Newtype_fam_insts`.
      
      Fixes #23329.
      e8b72ff6
    • Andrei Borzenkov's avatar
      Improved documentation for the Data.OldList.nub function · b3226616
      Andrei Borzenkov authored and Marge Bot's avatar Marge Bot committed
      There was recomentation to use map head . group . sort instead of nub
      function, but containers library has more suitable and efficient
      analogue
      b3226616
    • Krzysztof Gogolewski's avatar
      linear types: Don't add external names to the usage env · e3ddf58d
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      This has no observable effect, but avoids storing useless data.
      e3ddf58d
    • Josh Meredith's avatar
      base/encoding: add an allocations performance test (#22946) · ca611447
      Josh Meredith authored and Marge Bot's avatar Marge Bot committed
      ca611447
    • Luite Stegeman's avatar
      JavaScript: Correct arguments to h$appendToHsStringA · 98c5ee45
      Luite Stegeman authored and Marge Bot's avatar Marge Bot committed
      fixes #23278
      98c5ee45
    • Sylvain Henry's avatar
      Fix remaining issues with bound checking (#23123) · 2d5c1dde
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      While fixing these I've also changed the way we store addresses into
      ByteArray#. Addr# are composed of two parts: a JavaScript array and an
      offset (32-bit number).
      
      Suppose we want to store an Addr# in a ByteArray# foo at offset i.
      Before this patch, we were storing both fields as a tuple in the "arr"
      array field:
      
        foo.arr[i] = [addr_arr, addr_offset];
      
      Now we only store the array part in the "arr" field and the offset
      directly in the array:
      
        foo.dv.setInt32(i, addr_offset):
        foo.arr[i] = addr_arr;
      
      It avoids wasting space for the tuple.
      2d5c1dde
    • Josh Meredith's avatar
      JS: fix bounds checking (Issue 23123) · 116d7312
      Josh Meredith authored and Marge Bot's avatar Marge Bot committed
      * For ByteArray-based bounds-checking, the JavaScript backend must use the
      `len` field, instead of the inbuild JavaScript `length` field.
      
      * Range-based operations must also check both the start and end of the range
      for bounds
      
      * All indicies are valid for ranges of size zero, since they are essentially no-ops
      
      * For cases of ByteArray accesses (e.g. read as Int), the end index is
      (i * sizeof(type) + sizeof(type) - 1), while the previous implementation
      uses (i + sizeof(type) - 1). In the Int32 example, this is (i * 4 + 3)
      
      * IndexByteArrayOp_Word8As* primitives use byte array indicies (unlike
      the previous point), but now check both start and end indicies
      
      * Byte array copies now check if the arrays are the same by identity and
      then if the ranges overlap.
      116d7312
    • Matthew Pickering's avatar
      Use hash-unit-ids in release jobs · 944a9b94
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      Includes fix upload_ghc_libs glob
      944a9b94
    • Rodrigo Mesquita's avatar
      Add hashes to unit-ids created by hadrian · db4be339
      Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
      This commit adds support for computing an inputs hash for packages
      compiled by hadrian. The result is that ABI incompatible packages should
      be given different hashes and therefore be distinct in a cabal store.
      
      Hashing is enabled by the `--flag`, and is off by default as the hash
      contains a hash of the source files. We enable it when we produce
      release builds so that the artifacts we distribute have the right unit
      ids.
      db4be339
    • Rodrigo Mesquita's avatar
      Validate compatibility of ghcs when loading plugins · 6689c9c6
      Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
      Ensure, when loading plugins, that the ghc the plugin depends on is the
      ghc loading the plugin -- otherwise fail to load the plugin.
      
      Progress towards #20742.
      6689c9c6
    • Rodrigo Mesquita's avatar
      Hardwire a better unit-id for ghc · 3fdb18f8
      Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
      Previously, the unit-id of ghc-the-library was fixed as `ghc`.
      This was done primarily because the compiler must know the unit-id of
      some packages (including ghc) a-priori to define wired-in names.
      
      However, as seen in #20742, a reinstallable `ghc` whose unit-id is fixed
      to `ghc` might result in subtle bugs when different ghc's interact.
      
      A good example of this is having GHC_A load a plugin compiled by GHC_B,
      where GHC_A and GHC_B are linked to ghc-libraries that are ABI
      incompatible. Without a distinction between the unit-id of the ghc library
      GHC_A is linked against and the ghc library the plugin it is loading was
      compiled against, we can't check compatibility.
      
      This patch gives a slightly better unit-id to ghc (ghc-version) by
      (1) Not setting -this-unit-id to ghc, but rather to the new unit-id (modulo stage0)
      (2) Adding a definition to `GHC.Settings.Config` whose value is the new unit-id.
          (2.1) `GHC.Settings.Config` is generated by Hadrian
          (2.2) and also by cabal through `compiler/Setup.hs`
      This unit-id definition is imported by `GHC.Unit.Types` and used to
      set the wired-in unit-id of "ghc", which was previously fixed to "ghc"
      
      The commits following this one will improve the unit-id with a
      cabal-style package hash and check compatibility when loading plugins.
      
      Note that we also ensure that ghc's unit key matches unit id both when
      hadrian or cabal builds ghc, and in this way we no longer need to add
      `ghc` to the WiringMap.
      3fdb18f8
    • Matthew Pickering's avatar
      hadrian: Flavour: Change args -> extraArgs · 8cc9a534
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      Previously in a flavour definition you could override all the flags
      which were passed to GHC. This causes issues when needed to compute a
      package hash because we need to know what these extra arguments are
      going to be before computing the hash. The solution is to modify flavour
      so that the arguments you pass here are just extra ones rather than all
      the arguments that you need to compile something.
      
      This makes things work more like how cabal.project files work when you
      give extra arguments to a package and also means that flavour
      transformers correctly affect the hash.
      8cc9a534
    • amesgen's avatar
      Fix unlit path in cross bindists · 8fde4ac8
      amesgen authored and Marge Bot's avatar Marge Bot committed
      8fde4ac8
    • sheaf's avatar
      Don't forget to check the parent in an export list · 4eafb52a
      sheaf authored and Marge Bot's avatar Marge Bot committed
      Commit 3f374399 introduced a bug which caused us to forget to include
      the parent of an export item of the form T(..) (that is, IEThingAll)
      when checking for duplicate exports.
      
      Fixes #23318
      4eafb52a
    • Sylvain Henry's avatar
      Bump Cabal submodule (#22356) · 1e9caa1a
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      1e9caa1a
    • Bodigrim's avatar
      Document instances of Double · f3460845
      Bodigrim authored and Marge Bot's avatar Marge Bot committed
      f3460845
    • Ben Orchard's avatar
      Add sized primitive literal syntax · 931c8d82
      Ben Orchard authored and Marge Bot's avatar Marge Bot committed
      Adds a new LANGUAGE pragma ExtendedLiterals, which enables defining
      unboxed numeric literals such as `0xFF#Word8 :: Word8#`.
      
      Implements GHC proposal 0451:
      https://github.com/ghc-proposals/ghc-proposals/blob/b384a538b34f79d18a0201455b7b3c473bc8c936/proposals/0451-sized-literals.rst
      
      
      
      Fixes #21422.
      
      Bumps haddock submodule.
      
      Co-authored-by: default avatarKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>
      931c8d82
  4. Apr 30, 2023
  5. Apr 29, 2023
    • sheaf's avatar
      Add the Unsatisfiable class · 57277662
      sheaf authored
      This commit implements GHC proposal #433, adding the Unsatisfiable
      class to the GHC.TypeError module. This provides an alternative to
      TypeError for which error reporting is more predictable: we report it
      when we are reporting unsolved Wanted constraints.
      
      Fixes #14983 #16249 #16906 #18310 #20835
      57277662
  6. Apr 27, 2023
  7. Apr 26, 2023
Loading