1. 12 Nov, 2019 1 commit
  2. 08 Nov, 2019 16 commits
  3. 07 Nov, 2019 5 commits
  4. 06 Nov, 2019 4 commits
  5. 05 Nov, 2019 7 commits
    • Stefan Schulze Frielinghaus's avatar
      f9978f53
    • Ömer Sinan Ağacan's avatar
      CoreTidy: hide tidyRule · b7460492
      Ömer Sinan Ağacan authored
      b7460492
    • Ömer Sinan Ağacan's avatar
      e6ffe148
    • 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
    • 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).
      d57059f7
    • 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
      extension.
      
      This commit explicitly adds a description for it.
      
      [skip ci]
      7c28087a
  6. 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.
      120f2e53
    • Leif Metcalf's avatar
      Rephrase note on full-laziness · 5d4f16ee
      Leif Metcalf authored
      5d4f16ee
    • 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.
      3b65655c
  7. 03 Nov, 2019 2 commits
    • Richard Eisenberg's avatar
      Update Note references -- comments only · 3c916162
      Richard Eisenberg authored
      Follow-on from !2041.
      3c916162
    • 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
  8. 02 Nov, 2019 2 commits