1. 04 Jul, 2018 3 commits
    • Matthías Páll Gissurarson's avatar
      Fix errors caused by invalid candidates leaking from hole fits · 39de4e3d
      Matthías Páll Gissurarson authored
      This is a one line fix (and a note) that fixes four tickets, #15007,
       #15321 and #15202, #15314
      The issue was that errors caused by illegal candidates (according to GHC
      stage or being internal names) were leaking to the user, causing
      bewildering error messages. If a candidate causes the type checker to
      error, it is not a valid hole fit, and should be discarded.
      As mentioned in #15321, this can cause a pattern of omissions, which
      might be hard to discover. A better approach would be to gather the
      error messages, and ask users to report them as GHC bugs. This will be
      implemented in a subsequent change.
      Reviewers: bgamari, simonpj
      Reviewed By: simonpj
      Subscribers: simonpj, rwbarton, thomie, carter
      GHC Trac Issues: #15007, #15321, #15202, #15314
      Differential Revision: https://phabricator.haskell.org/D4909
    • Ömer Sinan Ağacan's avatar
      Fix nptr field alignment in RtClosureInspect · 15bb4e0b
      Ömer Sinan Ağacan authored
      `extractSubTerms` (which is extracting pointer and non-pointer fields of a
      closure) was computing the alignment incorrectly when aligning a 64-bit value
      (e.g. a Double) on i386 by aligning it to 64-bits instead of to word size
      (32-bits). This is documented in `mkVirtHeapOffsetsWithPadding`:
      > Align the start offset (eg, 2-byte value should be 2-byte aligned).
      > But not more than to a word.
      Fixes #15061
      Test Plan:
      Validated on both 32-bit and 64-bit. 32-bit fails with various unrelated stat
      failures, but no actual test failures.
      Reviewers: hvr, bgamari
      Reviewed By: bgamari
      Subscribers: simonpj, rwbarton, thomie, carter
      GHC Trac Issues: #15061
      Differential Revision: https://phabricator.haskell.org/D4906
    • Ömer Sinan Ağacan's avatar
      RtClosureInspect: add some docs, remove unused stuff · 6cb189d1
      Ömer Sinan Ağacan authored
      Details are not documented, only the high-level functions
      Reviewers: simonpj, hvr, bgamari
      Reviewed By: bgamari
      Subscribers: rwbarton, thomie, carter
      Differential Revision: https://phabricator.haskell.org/D4911
  2. 01 Jul, 2018 1 commit
  3. 29 Jun, 2018 4 commits
  4. 28 Jun, 2018 2 commits
  5. 27 Jun, 2018 3 commits
  6. 26 Jun, 2018 7 commits
  7. 25 Jun, 2018 7 commits
    • Simon Peyton Jones's avatar
      Record some notes about "innocuous" transformations · 1c2c2d3d
      Simon Peyton Jones authored
      I wondered if some transformations (ticks) might be "innocuous",
      in the sense that they do not unlock a later transformation that
      does not occur in the same pass.  If so, we could refrain from
      bumping the overall tick-count for such innocuous transformations,
      and perhaps terminate the simplifier one pass earlier.
      BUt alas I found that virtually nothing was innocuous!  This
      commit just adds a Note to record what I learned, in case
      anyone wants to try again.
    • Simon Peyton Jones's avatar
      Remove unused BottomFound from Tick · cea409a3
      Simon Peyton Jones authored
    • Simon Peyton Jones's avatar
      More misc comments · b4d54590
      Simon Peyton Jones authored
      ... plus, reorder equations in toIfaceVar to improve
      legibility.  No change in behaviour.
    • Simon Peyton Jones's avatar
      Coments and debug tracing only · 577399c0
      Simon Peyton Jones authored
      See Trac #15205
    • Simon Peyton Jones's avatar
      Refactor the kind-checking of tyvar binders · 9fc40c73
      Simon Peyton Jones authored
      The refactoring here is driven by the ghastly mess described in
      comment:24 of Trac #1520.  The overall goal is to simplify the
      kind-checking of typev-variable binders, and in particular to narrow
      the use of the "in-scope tyvar binder" stuff,
      which is needed only for associated types: see the new
      Note [Kind-checking tyvar binders for associated types] in TcHsType.
      * The "in-scope tyvar binder" stuff is done only in
           - kcLHsQTyVars, which is used for the LHsQTyVars of a
             data/newtype, or type family declaration.
           - tcFamTyPats, which is used for associated family instances;
             it now calls tcImplicitQTKBndrs, which in turn usese
      * tcExpicitTKBndrs (which is used only for function signatures,
        data con signatures, pattern synonym signatures, and expression
        type signatures) now does not go via the "in-scope tyvar binder"
        stuff at all.
      While I'm still not happy with all this code, the code is generally
      simpler, and I think this is a useful step forward. It does cure
      the problem too.
      (It's hard to trigger the problem in vanilla Haskell code, because
      the renamer would normally use different names for nested binders,
      so I can't offer a test.)
    • Simon Peyton Jones's avatar
      Improve tc-tracing a bit · 95324f01
      Simon Peyton Jones authored
    • Simon Peyton Jones's avatar
      Fix error recovery for pattern synonyms · 2896082e
      Simon Peyton Jones authored
      As Trac #15289 showed, we were carrying on after a type error
      in a pattern synonym, and then crashing.  This patch improves
      error handling for pattern synonyms.
      I also moved a bit of code from TcBinds into TcPatSyn, which
      helpfully narrows the API.
  8. 24 Jun, 2018 1 commit
  9. 22 Jun, 2018 10 commits
    • Roland Senn's avatar
      Remove -Wamp flag · 33724fc7
      Roland Senn authored
      Test Plan: "ghc -Wamp XXX.hs"  should give "unrecognised warning flag"
      Reviewers: bgamari
      Reviewed By: bgamari
      Subscribers: rwbarton, thomie, carter
      GHC Trac Issues: #11477
      Differential Revision: https://phabricator.haskell.org/D4785
    • SantiM's avatar
      rts/linker/{SymbolExtras,elf_got}.c: map code as read-only · 67c422ca
      SantiM authored
      protect mmaped addresses from writes after being initially manipulated
      Test Plan: ./validate
      Reviewers: bgamari, erikd, simonmar
      Reviewed By: bgamari
      Subscribers: angerman, carlostome, rwbarton, thomie, carter
      GHC Trac Issues: #14069
      Differential Revision: https://phabricator.haskell.org/D4817
    • Ben Gamari's avatar
      rts: Abort if timerfd read fails · c7b1e93b
      Ben Gamari authored
      Currently we belch some output to stderr but fail to abort, resulting in
      a busy loop. Fixes #15292.
      Test Plan:
       * Validate
       * try running program under environment without timerfd capabilities;
      ensure we don't busy-loop
      Reviewers: simonmar, erikd
      Reviewed By: simonmar
      Subscribers: rwbarton, thomie, carter
      GHC Trac Issues: #15929
      Differential Revision: https://phabricator.haskell.org/D4875
    • Tao He's avatar
      Include ghc-heap and libiserv in the "package" file. · 63d474bb
      Tao He authored
      Previously, the `make clean` (as well as `make dist-clean`) doesn't work
      for ghc-heap and libiserv, due to these two libraries are not presented
      in the "packages" file.
      Test Plan: [skip ci]
      Reviewers: bgamari
      Reviewed By: bgamari
      Subscribers: rwbarton, thomie, carter
      Differential Revision: https://phabricator.haskell.org/D4878
    • Andreas Klebinger's avatar
      Explain why opt-cmm is not dumped by ddump-cmm-verbose. · 391b0caf
      Andreas Klebinger authored
      We just update the docs to reflect the state of affairs.
      opt-cmm is run by the NCG backend so not always run.
      ddump-cmm-verbose only dumps passes of the cmm
      pipeline so it's not included there. [skip-ci]
      Test Plan: doc change
      Reviewers: bgamari
      Reviewed By: bgamari
      Subscribers: rwbarton, thomie, carter
      Differential Revision: https://phabricator.haskell.org/D4879
    • Alan Zimmerman's avatar
      TTG for IPBind had wrong extension name · 5f06cf6b
      Alan Zimmerman authored
      The standard[1] for extension naming is to use the XC prefix for the
      internal extension points, rather than for a new constructor.
      This is violated for IPBind, having
          data IPBind id
            = IPBind
                  (XIPBind id)
                  (Either (Located HsIPName) (IdP id))
                  (LHsExpr id)
            | XCIPBind (XXIPBind id)
      Swap the usage of XIPBind and XCIPBind
      [1] https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow#Namingconventions
      Closes #15302
    • Simon Peyton Jones's avatar
    • Simon Peyton Jones's avatar
      Remove unnecessary call to checkReductionDepth · d5459a33
      Simon Peyton Jones authored
      We call checkReductionDepth in chooseInstance, so there's no
      need to call it in selectNextWorkItem too
    • Simon Peyton Jones's avatar
      Refactor try_solve_fromInstance in shortCutSolver · e0653697
      Simon Peyton Jones authored
      This patch just removes the CtLoc parameter from trySolveFromInstance,
      since it can just as easily (and more uniformly) be gotten from the
      CtEvidence it is trying to solve.
    • Simon Peyton Jones's avatar
      Instances in no-evidence implications · 32eb4199
      Simon Peyton Jones authored
      Trac #15290 showed that it's possible that we might attempt to use a
      quantified constraint to solve an equality in a situation where we
      don't have anywhere to put the evidence bindings.  This made GHC crash.
      This patch stops the crash, but still rejects the pogram.  See
      Note [Instances in no-evidence implications] in TcInteract.
      Finding this bug revealed another lurking bug:
      * An infelicity in the treatment of superclasses -- we were expanding
        them locally at the leaves, rather than at their binding site; see
        (3a) in Note [The superclass story].
        As a consequence, TcRnTypes.superclassesMightHelp must look inside
      In more detail:
      * Stop the crash, by making TcInteract.chooseInstance test for
        the no-evidence-bindings case.  In that case we simply don't
        use the instance.  This entailed a slight change to the type
        of chooseInstance.
      * Make TcSMonad.getPendingScDicts (now renamed getPendingGivenScs)
        return only Givens from the /current level/; and make
        TcRnTypes.superClassesMightHelp look inside implications.
      * Refactor the simpl_loop and superclass-expansion stuff in
        TcSimplify.  The logic is much easier to understand now, and
        has less duplication.
  10. 21 Jun, 2018 2 commits