1. 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.
  2. 06 Nov, 2019 4 commits
  3. 05 Nov, 2019 7 commits
    • Stefan Schulze Frielinghaus's avatar
    • Ömer Sinan Ağacan's avatar
      CoreTidy: hide tidyRule · b7460492
      Ömer Sinan Ağacan authored
    • Ömer Sinan Ağacan's avatar
    • 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
      Fixes #13717, #17248, #17386
    • 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
      Fixes #11259
    • Ben Gamari's avatar
      rts: Add missing const in HEAP_ALLOCED_GC · d57059f7
      Ben Gamari authored
      This was previously unnoticed as this code-path is hit on very few
      platforms (e.g. OpenBSD).
    • Takenobu Tani's avatar
      users-guide: Improve documentaion of CPP extension · 7c28087a
      Takenobu Tani authored
      Currently, the description of CPP extension is given in the section of
      command-line options.
      Therefore, it is a little difficult to understand that it is a language
      This commit explicitly adds a description for it.
      [skip ci]
  4. 04 Nov, 2019 3 commits
    • Ben Gamari's avatar
      rts/linker: Ensure that code isn't writable · 120f2e53
      Ben Gamari authored
      For many years the linker would simply map all of its memory with
      PROT_READ|PROT_WRITE|PROT_EXEC. However operating systems have been
      becoming increasingly reluctant to accept this practice (e.g. #17353
      and #12657) and for good reason: writable code is ripe for exploitation.
      Consequently mmapForLinker now maps its memory with
      PROT_READ|PROT_WRITE.  After the linker has finished filling/relocating
      the mapping it must then call mmapForLinkerMarkExecutable on the
      sections of the mapping which contain executable code.
      Moreover, to make all of this possible it was necessary to redesign the
      m32 allocator. First, we gave (in an earlier commit) each ObjectCode its
      own m32_allocator. This was necessary since code loading and symbol
      resolution/relocation are currently interleaved, meaning that it is not
      possible to enforce W^X when symbols from different objects reside in
      the same page.
      We then redesigned the m32 allocator to take advantage of the fact that
      all of the pages allocated with the allocator die at the same time
      (namely, when the owning ObjectCode is unloaded). This makes a number of
      things simpler (e.g. no more page reference counting; the interface
      provided by the allocator for freeing is simpler). See
      Note [M32 Allocator] for details.
    • Leif Metcalf's avatar
      Rephrase note on full-laziness · 5d4f16ee
      Leif Metcalf authored
    • Ben Gamari's avatar
      SysTools: Only apply Windows-specific workaround on Windows · 3b65655c
      Ben Gamari authored
      Issue #1110 was apparently due to a bug in Vista which prevented GCC
      from finding its binaries unless we explicitly added it to PATH.
      However, this workaround was incorrectly applied on non-Windows
      platforms as well, resulting in ill-formed PATHs (#17266).
      Fixes #17266.
  5. 03 Nov, 2019 2 commits
    • Richard Eisenberg's avatar
      Update Note references -- comments only · 3c916162
      Richard Eisenberg authored
      Follow-on from !2041.
    • 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
      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
      This issue was raised in #17330. I also came up with a rather clean and
      type-safe solution to the problem: We define
      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, ...
  6. 02 Nov, 2019 3 commits
  7. 01 Nov, 2019 15 commits
  8. 31 Oct, 2019 4 commits
  9. 30 Oct, 2019 1 commit
    • Ben Gamari's avatar
      gitlab-ci: Fix the ARMv7 triple · 4898df1c
      Ben Gamari authored
      Previously we were configuring the ARMv7 builds with a host/target
      triple of arm-linux-gnueabihf, which caused us to target ARMv6 and
      consequently rely on the old CP15 memory barrier implementation. This
      barrier has to be emulated on ARMv8 machines which is glacially slow.
      Hopefully this should fix the ARMv7 builds which currently consistently
      time out.