This project is mirrored from Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
Last successful update .
  1. 05 Aug, 2018 4 commits
  2. 04 Aug, 2018 1 commit
  3. 03 Aug, 2018 3 commits
  4. 02 Aug, 2018 2 commits
    • Richard Eisenberg's avatar
      Remove decideKindGeneralisationPlan · c955a514
      Richard Eisenberg authored
      TypeInType came with a new function: decideKindGeneralisationPlan.
      This type-level counterpart to the term-level decideGeneralisationPlan
      chose whether or not a kind should be generalized. The thinking was
      that if `let` should not be generalized, then kinds shouldn't either
      (under the same circumstances around -XMonoLocalBinds).
      However, this is too conservative -- the situation described in the
      motivation for "let should be be generalized" does not occur in types.
      This commit thus removes decideKindGeneralisationPlan, always
      One consequence is that tc_hs_sig_type_and_gen no longer calls
      solveEqualities, which reports all unsolved constraints, instead
      relying on the solveLocalEqualities in tcImplicitTKBndrs. An effect
      of this is that reporing kind errors gets delayed more frequently.
      This seems to be a net benefit in error reporting; often, alongside
      a kind error, the type error is now reported (and users might find
      type errors easier to understand).
      Some of these errors ended up at the top level, where it was
      discovered that the GlobalRdrEnv containing the definitions in the
      local module was not in the TcGblEnv, and thus errors were reported
      with qualified names unnecessarily. This commit rejiggers some of
      the logic around captureTopConstraints accordingly.
      One error message (typecheck/should_fail/T1633)
      is a regression, mentioning the name of a default method. However,
      that problem is already reported as #10087, its solution is far from
      clear, and so I'm not addressing it here.
      This commit fixes #15141. As it's an internal refactor, there is
      no concrete test case for it.
      Along the way, we no longer need the hsib_closed field of
      HsImplicitBndrs (it was used only in decideKindGeneralisationPlan)
      and so it's been removed, simplifying the datatype structure.
      Along the way, I removed code in the validity checker that looks
      at coercions. This isn't related to this patch, really (though
      it was, at one point), but it's an improvement, so I kept it.
      This updates the haddock submodule.
    • Herbert Valerio Riedel's avatar
      Remove obsolete file · c50574a8
      Herbert Valerio Riedel authored
      This was missed by 0960a378
      [skip ci]
  5. 01 Aug, 2018 7 commits
    • Vladislav Zavialov's avatar
      Fix #15415 and simplify tcWildCardBinders · 120cc9f8
      Vladislav Zavialov authored
      Test Plan: Validate
      Reviewers: goldfire, simonpj, bgamari
      Reviewed By: simonpj
      Subscribers: RyanGlScott, rwbarton, thomie, carter
      GHC Trac Issues: #15415
      Differential Revision:
    • Ryan Scott's avatar
      Fix #15450 by refactoring checkEmptyCase' · 7f3cb50d
      Ryan Scott authored
      `checkEmptyCase'` (the code path for coverage-checking
      `EmptyCase` expressions) had a fair bit of code duplication from the
      code path for coverage-checking non-`EmptyCase` expressions, and to
      make things worse, it behaved subtly different in some respects (for
      instance, emitting different warnings under unsatisfiable
      constraints, as shown in #15450). This patch attempts to clean up
      both this discrepancy and the code duplication by doing the
      * Factor out a `pmInitialTmTyCs` function, which returns the initial
        set of term and type constraints to use when beginning coverage
        checking. If either set of constraints is unsatisfiable, we use an
        empty set in its place so that we can continue to emit as many
        warnings as possible. (The code path for non-`EmptyCase`
        expressions was doing this already, but not the code path for
        `EmptyCase` expressions, which is the root cause of #15450.)
        Along the way, I added a `Note` to explain why we do this.
      * Factor out a `pmIsSatisfiable` constraint which checks if a set of
        term and type constraints are satisfiable. This does not change any
        existing behavior; this is just for the sake of deduplicating code.
      Test Plan: make test TEST=T15450
      Reviewers: simonpj, bgamari
      Subscribers: rwbarton, thomie, carter
      GHC Trac Issues: #15450
      Differential Revision:
    • Moritz Angermann's avatar
      linker: Nub rpaths · b803c406
      Moritz Angermann authored
      When compiling and linking files in `ghci`, we keep adding rpath
      arguments to the linker command invoation.  If those are identical we
      should `nub` them out.  Otherwise we not only risk overflowing the
      argument limit, but also embed huge amounts of identical rpath values
      into the dynamic library, eventually leading to the overflow of the load
      command size limit, due to the number of rpath entries alone.
      A further improvement could be to pass `-Xlinker -dead_strip_dylibs`;
      that however might be stipping too aggressively, and potentially lead to
      missing symbols?
      For the time being I suggest to only do the nubbing and if need be to
      provide -Wl,-dead_strip_dylibs when invoking ghci.
      Test Plan: ./validate
      Reviewers: bgamari, hvr
      Reviewed By: bgamari
      Subscribers: rwbarton, thomie, carter
      GHC Trac Issues: #15446
      Differential Revision:
    • Christiaan Baaij's avatar
      Plugin dependency information is stored separately · 52065e95
      Christiaan Baaij authored
      We need to store the used plugins so that we recompile
      a module when a plugin that it uses is recompiled.
      However, storing the `ModuleName`s of the plugins used by a
      module in the `dep_mods` field made the rest of GHC think
      that they belong in the HPT, causing at least the issues
      reported in #15234
      We therefor store the `ModuleName`s of the plugins in a
      new field, `dep_plgins`, which is only used the the
      recompilation logic.
      Reviewers: mpickering, bgamari
      Reviewed By: mpickering, bgamari
      Subscribers: alpmestan, rwbarton, thomie, carter
      GHC Trac Issues: #15234
      Differential Revision:
    • Richard Eisenberg's avatar
      Remove the type-checking knot. · f8618a9b
      Richard Eisenberg authored
      Bug #15380 hangs because a knot-tied TyCon ended up in a kind.
      Looking at the code in tcInferApps, I'm amazed this hasn't happened
      before! I couldn't think of a good way to fix it (with dependent
      types, we can't really keep types out of kinds, after all), so
      I just went ahead and removed the knot.
      This was remarkably easy to do. In tcTyVar, when we find a TcTyCon,
      just use it. (Previously, we looked up the knot-tied TyCon and used
      that.) Then, during the final zonk, replace TcTyCons with the real,
      full-blooded TyCons in the global environment. It's all very easy.
      The new bit is explained in the existing
      Note [Type checking recursive type and class declarations]
      in TcTyClsDecls.
      Naturally, I removed various references to the knot and the
      zonkTcTypeInKnot (and related) functions. Now, we can print types
      during type checking with abandon!
      NB: There is a teensy error message regression with this patch,
      around the ordering of quantified type variables. This ordering
      problem is fixed (I believe) with the patch for #14880. The ordering
      affects only internal variables that cannot be instantiated with
      any kind of visible type application.
      There is also a teensy regression around the printing of types
      in TH splices. I think this is really a TH bug and will file
      Test case: dependent/should_fail/T15380
    • Ben Gamari's avatar
      Revert "Don't inline functions with RULES too early" · 1df50a0f
      Ben Gamari authored
      This commit causes significant performance regressions:
      bytes allocated value is too high:
          Expected    T9872d(normal) bytes allocated: 578498120 +/-5%
          Lower bound T9872d(normal) bytes allocated: 549573214
          Upper bound T9872d(normal) bytes allocated: 607423026
          Actual      T9872d(normal) bytes allocated: 677179968
          Deviation   T9872d(normal) bytes allocated:      17.1 %
      bytes allocated value is too high:
          Expected    T9872c(normal) bytes allocated: 3096670112 +/-5%
          Lower bound T9872c(normal) bytes allocated: 2941836606
          Upper bound T9872c(normal) bytes allocated: 3251503618
          Actual      T9872c(normal) bytes allocated: 3601872536
          Deviation   T9872c(normal) bytes allocated:       16.3 %
      bytes allocated value is too high:
          Expected    T9872b(normal) bytes allocated: 3730686224 +/-5%
          Lower bound T9872b(normal) bytes allocated: 3544151912
          Upper bound T9872b(normal) bytes allocated: 3917220536
          Actual      T9872b(normal) bytes allocated: 4374298272
          Deviation   T9872b(normal) bytes allocated:       17.3 %
      bytes allocated value is too high:
          Expected    T9872a(normal) bytes allocated: 2729927408 +/-5%
          Lower bound T9872a(normal) bytes allocated: 2593431037
          Upper bound T9872a(normal) bytes allocated: 2866423779
          Actual      T9872a(normal) bytes allocated: 3225788896
          Deviation   T9872a(normal) bytes allocated:       18.2 %
      It's not clear that this was intentional so I'm going to revert for now.
      This reverts commit 2110738b.
    • Ben Gamari's avatar
      rts: Fix unused function · 9bd48643
      Ben Gamari authored
  6. 31 Jul, 2018 9 commits
  7. 30 Jul, 2018 5 commits
    • Ben Gamari's avatar
      base: Make Foreign.Marshal.Alloc.allocBytes[Aligned] NOINLINE · 56590db0
      Ben Gamari authored
      As noted in #14346, touch# may be optimized away when the simplifier can see
      that the continuation passed to allocaBytes will not return. Marking CPS-style
      functions with NOINLINE ensures that the simplier can't draw any unsound
      Ultimately the right solution here will be to do away with touch# and instead
      introduce a scoped primitive as is suggested in #14375.
      Note: This was present in 8.2 but was never merged to 8.4 in hopes that
      we would have #14375 implemented in time. This meant that the issue
      regressed again in 8.4. Thankfully we caught it in time to fix it for
      (cherry picked from commit 404bf05e)
    • Josh Price's avatar
    • Ben Gamari's avatar
      Bump terminfo submodule to · c6262464
      Ben Gamari authored
    • Roland Senn's avatar
      GHC doesn't handle ./ prefixed paths correctly (#12674) · a7c8acda
      Roland Senn authored
      Summary: If a filename starts with a hypen, GHC keeps the prefixed "./" path.
      Test Plan: make test TEST=T12674
      Reviewers: Phyx, nomeata, bgamari, erikd
      Reviewed By: Phyx
      Subscribers: rwbarton, thomie, carter
      GHC Trac Issues: #12674
      Differential Revision:
    • Ryan Scott's avatar
      Fix #15385 by using addDictsDs in matchGuards · 9d388eb8
      Ryan Scott authored
      When coverage checking pattern-matches, we rely on the call
      sites in the desugarer to populate the local dictionaries and term
      evidence in scope using `addDictsDs` and `addTmCsDs`. But it turns
      out that only the call site for desugaring `case` expressions was
      actually doing this properly. In another part of the desugarer,
      `matchGuards` (which handles pattern guards), it did not update the
      local dictionaries in scope at all, leading to #15385.
      Fixing this is relatively straightforward: just augment the
      `BindStmt` case of `matchGuards` to use `addDictsDs` and `addTmCsDs`.
      Accomplishing this took a little bit of import/export tweaking:
      * We now need to export `collectEvVarsPat` from `HsPat.hs`.
      * To avoid an import cycle with `Check.hs`, I moved `isTrueLHsExpr`
        from `DsGRHSs.hs` to `DsUtils.hs`, which resides lower on the
        import chain.
      Test Plan: make test TEST=T15385
      Reviewers: simonpj, bgamari
      Reviewed By: simonpj
      Subscribers: rwbarton, thomie, carter
      GHC Trac Issues: #15385
      Differential Revision:
  8. 29 Jul, 2018 1 commit
    • Ningning Xie's avatar
      Fix #15453: bug in ForAllCo case in opt_trans_rule · 11de4380
      Ningning Xie authored
      co1 = \/ tv1 : eta1. r1
      co2 = \/ tv2 : eta2. r2
      We would like to optimize `co1; co2` so we push transitivity inside forall.
      It should be
      \/tv1 : (eta1;eta2).  (r1; r2[tv2 |-> tv1 |> eta1])
      It is implemented in the ForAllCo case in opt_trans_rule in OptCoercion.
      However current implementation is not right:
      r2' = substCoWithUnchecked [tv2] [TyVarTy tv1] r2 -- ill-kinded!
      This patch corrects it to be
      r2' = substCoWithUnchecked [tv2] [mkCastTy (TyVarTy tv1) eta1] r2
      Test Plan: validate
      Reviewers: bgamari, goldfire, RyanGlScott
      Reviewed By: RyanGlScott
      Subscribers: rwbarton, thomie, carter
      GHC Trac Issues: #15453
      Differential Revision:
  9. 28 Jul, 2018 1 commit
  10. 27 Jul, 2018 7 commits