1. 24 Jun, 2019 3 commits
    • Sergei Trofimovich's avatar
      powerpc32: fix 64-bit comparison (#16465) · 7ed5db87
      Sergei Trofimovich authored
      On powerpc32 64-bit comparison code generated dangling
      target labels. This caused ghc build failure as:
          $ ./configure --target=powerpc-unknown-linux-gnu && make
          SCCs aren't in reverse dependent order
          bad blockId n3U
      This happened because condIntCode' in PPC codegen generated
      label name but did not place the label into `cmp_lo` code block.
      The change adds the `cmp_lo` label into the case of negative
      Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
      (cherry picked from commit 973077ac)
    • Moritz Angermann's avatar
      llvm-targets: Add x86_64 android layout · 3d0fa737
      Moritz Angermann authored
      (cherry picked from commit e87b9f87)
    • Ben Gamari's avatar
      Fix T16737 · 5edcf949
      Ben Gamari authored
      * Disable in profasm way when GHC is dynamically linked
      * Drop -optcxx as fix for #16477 is not present in 8.8
  2. 23 Jun, 2019 9 commits
    • Zejun Wu's avatar
      Pass preprocessor options to C compiler when building foreign C files (#16737) · 1c18d3b4
      Zejun Wu authored
      (cherry picked from commit cfd3e0f1)
    • Ben Gamari's avatar
      testsuite: Add test for #16514 · c1c0ce7a
      Ben Gamari authored
      (cherry picked from commit 41bf4045)
    • Iavor S. Diatchki's avatar
      Add a `NOINLINE` pragma on `someNatVal` (#16586) · ab8a4a3a
      Iavor S. Diatchki authored
      This fixes #16586, see `Note [NOINLINE someNatVal]` for details.
      (cherry picked from commit 59f4cb6f)
    • Yuriy Syrovetskiy's avatar
      Replace git.haskell.org with gitlab.haskell.org (#16196) · 04a27889
      Yuriy Syrovetskiy authored
      (cherry picked from commit 75abaaea)
    • Shayne Fletcher's avatar
      Make Extension derive Bounded · bdb70d2e
      Shayne Fletcher authored
      (cherry picked from commit 9047f184)
    • Ben Gamari's avatar
      ghci: Ensure that system libffi include path is searched · 0988b193
      Ben Gamari authored
      Previously hsc2hs failed when building against a system FFI.
      (cherry picked from commit 1abb76ab)
    • Ben Gamari's avatar
      users guide: Mention supported LLVM version · 0b1519b3
      Ben Gamari authored
    • Simon Peyton Jones's avatar
      Add a missing update of sc_hole_ty (#16312) · 589ad602
      Simon Peyton Jones authored
      In simplCast I totally failed to keep the sc_hole_ty field of
      ApplyToTy (see Note [The hole type in ApplyToTy]) up to date.
      When a cast goes by, of course the hole type changes.
      Amazingly this has not bitten us before, but #16312 finally
      triggered it.  Fortunately the fix is simple.
      Fixes #16312.
      (cherry picked from commit ef36b102)
    • Michael Peyton Jones's avatar
      Visibility: handle multiple units with the same name · 856cdb9d
      Michael Peyton Jones authored
      Fixes #16228. The included test case is adapted from the reproduction in
      the issue, and fails without this patch.
      We compute an initial visilibity mapping for units based on what is
      present in the package databases. To seed this, we compute a set of all
      the package configs to add visibilities for.
      However, this set was keyed off the unit's *package name*. This is
      correct, since we compare packages across databases by version. However,
      we would only ever consider a single, most-preferable unit from the
      database in which it was found.
      The effect of this was that only one of the libraries in a Cabal package
      would be added to this initial set. This would cause attempts to use
      modules from the omitted libraries to fail, claiming that the package
      was hidden (even though `ghc-pkg` would correctly show it as visible).
      A solution is to do the selection of the most preferable packages
      separately, and then be sure to consider exposing all units in the
      same package in the same package db. We can do this by picking a
      most-preferable unit for each package name, and then considering
      exposing all units that are equi-preferable with that unit.
      Why wasn't this bug apparent to all people trying to use sub-libraries
      in Cabal? The answer is that Cabal explicitly passes `-package` and
      `-package-id` flags for all the packages it wants to use, rather than
      relying on the state of the package database. So this bug only really
      affects people who are trying to use package databases produced by Cabal
      outside of Cabal itself.
      One particular example of this is the way that the
      Nixpkgs Haskell infrastructure provides wrapped GHCs: typically these
      are equipped with a package database containing all the needed
      package dependencies, and the user is not expected to pass
      `-package` flags explicitly.
      (cherry picked from commit 8a20bfc2)
  3. 22 Jun, 2019 1 commit
  4. 21 Jun, 2019 1 commit
  5. 19 Jun, 2019 2 commits
    • Richard Eisenberg's avatar
      Fix #16517 by bumping the TcLevel for method sigs · 4a5ab8f0
      Richard Eisenberg authored
      There were actually two bugs fixed here:
      1. candidateQTyVarsOfType needs to be careful that it does not
         try to zap metavariables from an outer scope as "naughty"
         quantification candidates. This commit adds a simple check
         to avoid doing so.
      2. We weren't bumping the TcLevel in kcHsKindSig, which was used
         only for class method sigs. This mistake led to the acceptance
           class C a where
             meth :: forall k. Proxy (a :: k) -> ()
         Note that k is *locally* quantified. This patch fixes the
         problem by using tcClassSigType, which correctly bumps the
         level. It's a bit inefficient because tcClassSigType does other
         work, too, but it would be tedious to repeat much of the code
         there with only a few changes. This version works well and is
      And, while updating comments, etc., I noticed that tcRnType was
      missing a pushTcLevel, leading to #16767, which this patch also
      fixes, by bumping the level. In the refactoring here, I also
      use solveEqualities. This initially failed ghci/scripts/T15415,
      but that was fixed by teaching solveEqualities to respect
      This patch also cleans up some Notes around error generation that
      came up in conversation.
      Test case: typecheck/should_fail/T16517, ghci/scripts/T16767
      (cherry picked from commit a22e51ea)
      (cherry picked from commit 19ab32c5)
    • Simon Peyton Jones's avatar
      Fail fast in solveLocalEqualities · ce6a492b
      Simon Peyton Jones authored
      This patch makes us fail fast in TcSimplify.solveLocalEqualities,
      and in TcHsType.tc_hs_sig_type, if there are insoluble constraints.
      Previously we ploughed on even if there were insoluble constraints,
      leading to a cascade of hard-to-understand type errors. Failing
      eagerly is much better; hence a lot of testsuite error message
      changes.  Eg if we have
                f :: [Maybe] -> blah
                f xs = e
      then trying typecheck 'f x = e' with an utterly bogus type
      is just asking for trouble.
      I can't quite remember what provoked me to make this change,
      but I think the error messages are notably improved, by
      removing confusing clutter and focusing on the real error.
      (cherry picked from commit 5c1f268e)
  6. 18 Jun, 2019 1 commit
  7. 17 Jun, 2019 1 commit
    • Peter Trommler's avatar
      RTS: Add missing memory barrier · 2df05448
      Peter Trommler authored
      In the work stealing queue a load-load-barrier is required to ensure
      that a read of queue data cannot be reordered before a read of the
      bottom pointer into the queue.
      The added load-load-barrier ensures that the ordering of writes enforced
      at the end of `pushWSDeque` is also respected in the order of reads in
      `stealWSDeque_`. In other words, when reading `q->bottom` we want to make
      sure that we see the updates to `q->elements`.
      Fixes #13633
      (cherry picked from commit 5c084e04)
  8. 16 Jun, 2019 6 commits
  9. 15 Jun, 2019 3 commits
    • Ben Gamari's avatar
      PrelRules: Don't break let/app invariant in shiftRule · fee015b5
      Ben Gamari authored
      Previously shiftRule would rewrite as invalid shift like
      let x = I# (uncheckedIShiftL# n 80)
      in ...
      let x = I# (error "invalid shift")
      in ...
      However, this breaks the let/app invariant as `error` is not
      okay-for-speculation. There isn't an easy way to avoid this so let's not
      try. Instead we just take advantage of the undefined nature of invalid
      shifts and return zero.
      Fixes #16742.
      (cherry picked from commit 0bd3b9dd)
    • Ben Gamari's avatar
      users-guide: More release notes · 4b40bad6
      Ben Gamari authored
    • Iustin Pop's avatar
      Fix typo in 8.8.1 notes related to traceBinaryEvent · ed342f36
      Iustin Pop authored
      - fixes double mention of `traceBinaryEvent#` (the second one should be `traceEvent#`, I think)
      - fixes note about `traceEvent#` taking a `String` - the docs say it takes a zero-terminated ByteString.
      (cherry picked from commit 63150b9e)
  10. 13 Jun, 2019 3 commits
  11. 12 Jun, 2019 10 commits