1. 20 Nov, 2019 1 commit
    • Alexey Kuleshevich's avatar
      hpc: Fix encoding issues. Add test for and fix #17073 · ef8a08e0
      Alexey Kuleshevich authored
      
      
      * Make sure files are being read/written in UTF-8. Set encoding while writing
        HTML output. Also set encoding while writing and reading .tix files although
        we don't yet have a ticket complaining that this poses problems.
      * Set encoding in html header to utf8
      * Upgrade to new version of 'hpc' library and reuse `readFileUtf8`
        and `writeFileUtf8` functions
      * Update git submodule for `hpc`
      * Bump up `hpc` executable version
      Co-authored-by: Ben Gamari's avatarBen Gamari <ben@smart-cactus.org>
      ef8a08e0
  2. 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.
      a7571a74
    • 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
      expected.
      
      Closes #17440.
      08d595c0
  3. 17 Nov, 2019 2 commits
  4. 15 Nov, 2019 1 commit
  5. 14 Nov, 2019 1 commit
  6. 13 Nov, 2019 2 commits
  7. 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
      collect_compiler_stats).
      
      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:
          lazy-bs-alloc
          T3586
      
      Metric Increase:
          space_leak_001
          T4801
          T5835
          T12791
      643d42fc
  8. 11 Nov, 2019 4 commits
  9. 10 Nov, 2019 2 commits
  10. 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.
      1f98e47d
    • 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.
      011f3121
    • 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.
      b62ca659
    • 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.
      a9b14790
    • 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.
      f73fbd2d
    • 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
      solution.
      
      Regardless, the cleaning logic is quite redundant now that we run each
      test in a hermetic environment. Let's just remove it.
      1f871e70
    • 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.
      c1f1f3f9
    • 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.
      411ba7ba
    • Ben Gamari's avatar
      dcb23ec9
    • Ben Gamari's avatar
      testsuite: Fix header #include order on Windows · a50ecda6
      Ben Gamari authored
      <Rts.h> must always come first.
      a50ecda6
    • Ben Gamari's avatar
      testsuite: Skip T14931 on Windows · 7c2ce0a0
      Ben Gamari authored
      This test uses -dynamic-too, which is not supported on Windows.
      7c2ce0a0
    • Ben Gamari's avatar
      testsuite: Skip T16916 on Windows · 925fbdbb
      Ben Gamari authored
      The event manager is not supported on Windows.
      925fbdbb
    • Ben Gamari's avatar
      testsuite: Fix Windows cleanup path · 0fb246c3
      Ben Gamari authored
      This was a regression introduced with the Path refactoring.
      0fb246c3
  11. 08 Nov, 2019 3 commits
  12. 07 Nov, 2019 1 commit
    • Ryan Scott's avatar
      Clean up TH's treatment of unary tuples (or, #16881 part two) · 708c60aa
      Ryan Scott authored
      !1906 left some loose ends in regards to Template Haskell's treatment
      of unary tuples. This patch ends to tie up those loose ends:
      
      * In addition to having `TupleT 1` produce unary tuples, `TupE [exp]`
        and `TupP [pat]` also now produce unary tuples.
      * I have added various special cases in GHC's pretty-printers to
        ensure that explicit 1-tuples are printed using the `Unit` type.
        See `testsuite/tests/th/T17380`.
      * The GHC 8.10.1 release notes entry has been tidied up a little.
      
      Fixes #16881. Fixes #17371. Fixes #17380.
      708c60aa
  13. 05 Nov, 2019 2 commits
    • Sebastian Graf's avatar
      Check EmptyCase by simply adding a non-void constraint · 1593debf
      Sebastian Graf authored
      We can handle non-void constraints since !1733, so we can now express
      the strictness of `-XEmptyCase` just by adding a non-void constraint
      to the initial Uncovered set.
      
      For `case x of {}` we thus check that the Uncovered set `{ x | x /~ ⊥ }`
      is non-empty. This is conceptually simpler than the plan outlined in
       #17376, because it talks to the oracle directly.
      
      In order for this patch to pass the testsuite, I had to fix handling of
      newtypes in the pattern-match checker (#17248).
      
      Since we use a different code path (well, the main code path) for
      `-XEmptyCase` now, we apparently also handle #13717 correctly.
      There's also some dead code that we can get rid off now.
      
      `provideEvidence` has been updated to provide output more in line with
      the old logic, which used `inhabitationCandidates` under the hood.
      
      A consequence of the shift away from the `UncoveredPatterns` type is
      that we don't report reduced type families for empty case matches,
      because the pretty printer is pure and only knows the match variable's
      type.
      
      Fixes #13717, #17248, #17386
      1593debf
    • Peter Trommler's avatar
      testsuite: skip test requiring RTS linker on PowerPC · 487ede42
      Peter Trommler authored
      The RTS linker is not available on 64-bit PowerPC. Instead of
      marking tests that require the RTS linker as broken on PowerPC
      64-bit skip the respective tests on all platforms where the
      RTS linker or a statically linked external interpreter is not
      available.
      
      Fixes #11259
      487ede42
  14. 03 Nov, 2019 1 commit
    • Sebastian Graf's avatar
      Separate `LPat` from `Pat` on the type-level · 182b1199
      Sebastian Graf authored
      Since the Trees That Grow effort started, we had `type LPat = Pat`.
      This is so that `SrcLoc`s would only be annotated in GHC's AST, which is
      the reason why all GHC passes use the extension constructor `XPat` to
      attach source locations. See #15495 for the design discussion behind
      that.
      
      But now suddenly there are `XPat`s everywhere!
      There are several functions which dont't cope with `XPat`s by either
      crashing (`hsPatType`) or simply returning incorrect results
      (`collectEvVarsPat`).
      
      This issue was raised in #17330. I also came up with a rather clean and
      type-safe solution to the problem: We define
      
      ```haskell
      type family XRec p (f :: * -> *) = r | r -> p f
      type instance XRec (GhcPass p) f = Located (f (GhcPass p))
      type instance XRec TH          f =          f p
      type LPat p = XRec p Pat
      ```
      
      This is a rather modular embedding of the old "ping-pong" style, while
      we only pay for the `Located` wrapper within GHC. No ping-ponging in
      a potential Template Haskell AST, for example. Yet, we miss no case
      where we should've handled a `SrcLoc`: `hsPatType` and
      `collectEvVarsPat` are not callable at an `LPat`.
      
      Also, this gets rid of one indirection in `Located` variants:
      Previously, we'd have to go through `XPat` and `Located` to get from
      `LPat` to the wrapped `Pat`. Now it's just `Located` again.
      
      Thus we fix #17330.
      182b1199
  15. 02 Nov, 2019 1 commit
    • Simon Peyton Jones's avatar
      Make CSE delay inlining less · 4a6d3d68
      Simon Peyton Jones authored
      CSE delays inlining a little bit, to avoid losing vital
      specialisations; see Note [Delay inlining after CSE] in CSE.
      
      But it was being over-enthusiastic.  This patch makes the
      delay only apply to Ids with specialisation rules, which
      avoids unnecessary delay (#17409).
      4a6d3d68
  16. 01 Nov, 2019 3 commits