1. 27 Nov, 2019 1 commit
    • Sebastian Graf's avatar
      Make warnings for TH splices opt-in · 5a08f7d4
      Sebastian Graf authored
      In #17270 we have the pattern-match checker emit incorrect warnings. The
      reason for that behavior is ultimately an inconsistency in whether we
      treat TH splices as written by the user (`FromSource :: Origin`) or as
      generated code (`Generated`). This was first reported in #14838.
      The current solution is to TH splices as `Generated` by default and only
      treat them as `FromSource` when the user requests so
      (-fenable-th-splice-warnings). There are multiple reasons for opt-in
      rather than opt-out:
        * It's not clear that the user that compiles a splice is the author of the code
          that produces the warning. Think of the situation where she just splices in
          code from a third-party library that produces incomplete pattern matches.
          In this scenario, the user isn't even able to fix that warning.
        * Gathering information for producing the warnings (pattern-match check
          warnings in particular) is costly. There's no point in doing so if the user
          is not interested in those warnings.
      Fixes #17270, but not #14838, because the proper solution needs a GHC
      proposal extending the TH AST syntax.
  2. 25 Nov, 2019 1 commit
  3. 24 Nov, 2019 1 commit
  4. 23 Nov, 2019 4 commits
    • Sebastian Graf's avatar
      Stricten functions ins GHC.Natural · 5747ebe9
      Sebastian Graf authored
      This brings `Natural` on par with `Integer` and fixes #17499.
      Also does some manual CSE for 0 and 1 literals.
    • Ryan Scott's avatar
      Prevent -optc arguments from being duplicated in reverse order (#17471) · 15f1dc33
      Ryan Scott authored
      This reverts a part of commit
      7bc5d6c6 that causes all arguments
      to `-optc` (and `-optcxx`) to be passed twice to the C/C++ compiler,
      once in reverse order and then again in the correct order. While
      passing duplicate arguments is usually harmless it can cause breakage
      in this pattern, which is employed by Hackage libraries in the wild:
      ghc Foo.hs foo.c -optc-D -optcFOO
      As `FOO -D -D FOO` will cause compilers to error.
      Fixes #17471.
    • Abigail's avatar
      Take care to not eta-reduce jumps in CorePrep · de6bbdf2
      Abigail authored
      CorePrep already had a check to prevent it from eta-reducing Ids that
      respond true to hasNoBinding (foreign calls, constructors for unboxed
      sums and products, and Ids with compulsory unfoldings). It did not,
      however, consider join points as ids that 'must be saturated'.
      Checking whether the Id responds True to 'isJoinId' should prevent
      CorePrep from turning saturated jumps like the following (from #17429)
      into undersaturated ones:
            (\ eta_XP ->
               join { mapped_s1vo _ = lvl_s1vs } in jump mapped_s1vo eta_XP)
    • Ben Gamari's avatar
      rts: Expose interface for configuring EventLogWriters · e43e6ece
      Ben Gamari authored
      This exposes a set of interfaces from the GHC API for configuring
      EventLogWriters. These can be used by consumers like
  5. 20 Nov, 2019 2 commits
  6. 19 Nov, 2019 2 commits
    • Ben Gamari's avatar
      testsuite: Increase width of stack003 test · a7571a74
      Ben Gamari authored
      Previously the returned tuple seemed to fit in registers on amd64. This
      meant that non-moving collector bug would cause the test to fail on i386
      yet not amd64.
    • Ben Gamari's avatar
      Give seq a more precise type and remove magic · 08d595c0
      Ben Gamari authored
      `GHC.Prim.seq` previously had the rather plain type:
          seq :: forall a b. a -> b -> b
      However, it also had a special typing rule to applications
      where `b` is not of kind `Type`.
      Issue #17440 noted that levity polymorphism allows us to rather give
      it the more precise type:
          seq :: forall (r :: RuntimeRep) a (b :: TYPE r). a -> b -> b
      This allows us to remove the special typing rule that we previously
      required to allow applications on unlifted arguments. T9404 contains a
      non-Type application of `seq` which should verify that this works as
      Closes #17440.
  7. 17 Nov, 2019 2 commits
  8. 15 Nov, 2019 1 commit
  9. 14 Nov, 2019 1 commit
  10. 13 Nov, 2019 2 commits
  11. 12 Nov, 2019 1 commit
    • Alp Mestanogullari's avatar
      testsuite: don't collect compiler stats in collect_runtime_residency · 643d42fc
      Alp Mestanogullari authored
      We instead want to collect the runtime stats (with collect_stats, instead of
      This should fix a number of perf tests failures we have been seeing, where
      we suddenly started measuring metrics we didn't intend to measure, which
      tend to fall outside of the acceptance window.
      Metric Decrease:
      Metric Increase:
  12. 11 Nov, 2019 4 commits
  13. 10 Nov, 2019 2 commits
  14. 09 Nov, 2019 13 commits
    • Simon Peyton Jones's avatar
      Use the right type in :force · 1f98e47d
      Simon Peyton Jones authored
      A missing prime meant that we were considering the wrong
      type in the GHCi debugger, when doing :force on multiple
      arguments (issue #17431).
      The fix is trivial.
    • Ben Gamari's avatar
      testsuite: Mark T16219 as fragile on Windows · 011f3121
      Ben Gamari authored
      As noted in #17452, this test produces very long file paths which
      exceed the Windows MAX_PATH limitation. Mark the test as fragile for not
      until we can come up with a better solution.
    • Ben Gamari's avatar
      testsuite: Drop T7995 · b62ca659
      Ben Gamari authored
      This test is quite sensitive to the build configuration as it requires that ghc
      have unfoldings, which isn't true in the quick build flavours. I considered
      various options to make the test more robust but none of them seemed
      particularly appealing. Moreover, Simon PJ was a bit skeptical of the value of
      the test to begin with and I strongly suspect that any regression in #7995
      would be accompanied by failures in our other compiler performance tests.
      Closes #17399.
    • Ben Gamari's avatar
      testsuite: Fix putStrLn in saks028 · a9b14790
      Ben Gamari authored
      Bizarrely, `saks028` previously failed reliably, but only on Windows
      (#17450). The test would exit with a zero exit code but simply didn't
      emit the expected text to stderr.
      I believe this was due to the fact that the test used `putStrLn`,
      resulting in the output ending up on stdout. This worked on other
      platforms since (apparently) we redirect stdout to stderr when
      evaluating splices. However, on Windows it seems that the redirected
      output wasn't flushed as it was on other platforms.
      Anyways, it seems like the right thing to do here is to be explicit
      about our desire for the output to end up on stderr.
      Closes #17450.
    • Ben Gamari's avatar
      testsuite: Ignore stderr in PartialDownsweep · f73fbd2d
      Ben Gamari authored
      As described in #17449, PartialDownsweep is currently fragile due to its
      dependence on the error messages produced by the C preprocessor. To eliminate
      this dependence we simply ignore stderr output, instead relying on the fact
      that the test will exit with a non-zero exit code on failure.
      Fixes #17449.
    • Ben Gamari's avatar
      testsuite: Remove redundant cleaning logic from T16511 · 1f871e70
      Ben Gamari authored
      The GHCi script for T16511 had some `rm` commands to clean up output
      from previous runs. This should be harmless since stderr was redirected
      to /dev/null; however, it seems that this redirection doesn't work on
      Windows (perhaps because GHCi uses `cmd` to execute the command-line;
      I'm not sure). I tried to fix it but was unable to find a sensible
      Regardless, the cleaning logic is quite redundant now that we run each
      test in a hermetic environment. Let's just remove it.
    • Ben Gamari's avatar
      testsuite: Mark T16219 as unbroken · c1f1f3f9
      Ben Gamari authored
      This was previously broken due to #16386 yet it passes for me locally.
    • Ben Gamari's avatar
      testsuite: Mark T11627b as fragile · 411ba7ba
      Ben Gamari authored
      It was previously marked as broken due to #12236 however it passes for
      me locally while failing on CI.
    • Ben Gamari's avatar
    • Ben Gamari's avatar
      testsuite: Fix header #include order on Windows · a50ecda6
      Ben Gamari authored
      <Rts.h> must always come first.
    • Ben Gamari's avatar
      testsuite: Skip T14931 on Windows · 7c2ce0a0
      Ben Gamari authored
      This test uses -dynamic-too, which is not supported on Windows.
    • Ben Gamari's avatar
      testsuite: Skip T16916 on Windows · 925fbdbb
      Ben Gamari authored
      The event manager is not supported on Windows.
    • Ben Gamari's avatar
      testsuite: Fix Windows cleanup path · 0fb246c3
      Ben Gamari authored
      This was a regression introduced with the Path refactoring.
  15. 08 Nov, 2019 3 commits