This project is mirrored from https://gitlab.haskell.org/ghc/ghc.git. 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. 06 Aug, 2018 12 commits
    • Mathieu Boespflug's avatar
      docs: Fix wrong module name in hsig example · ce9b459d
      Mathieu Boespflug authored
      In the module signatures section, two modules were defined, `Str` and
      `A`, but `A` was importing `Text`, not `Str`.
      
      (cherry picked from commit 26ab3635ca342c88310321d7f310f1c12c23ec4c)
      ce9b459d
    • Alexander Biehl's avatar
      Add since annotation to GHC.ByteOrder · 8b357c6a
      Alexander Biehl authored
      (cherry picked from commit 6fb2620dbc420c976dc9da90b0efc6eae533ebff)
      8b357c6a
    • Ben Gamari's avatar
      rts: Ensure that the_gc_thread is aligned · c6cc93bc
      Ben Gamari authored
      Since we cast this to a gc_thread the compiler may assume that it's aligned.
      Make sure that this is so. Fixes #15482.
      c6cc93bc
    • Roland Senn's avatar
      Improve error message for flags with missing required arguments (#12625) · ff06176b
      Roland Senn authored
      Test Plan: make TEST=T12625
      
      Reviewers: jstolarek, austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie, carter
      
      GHC Trac Issues: #12625
      
      Differential Revision: https://phabricator.haskell.org/D5030
      ff06176b
    • Moritz Angermann's avatar
      Stop the linker panic · 4fc6524a
      Moritz Angermann authored
      If we fail to initialize the liker properly, we still set the
      `initLinkerDone`. In fact we even set that prior to actually
      initializing the linker. However if the linker initialization fails, we
      the `Done` state is still true. As such we run into the `Dynamic Linker
      not initialised` error. Which while technically corret is confusing as
      it pulls the attation away from the real issue.
      
      This change puts the Done state into an MVar, and as such ensureing
      that all parallel access needs to wait for the linker to be actually
      initialized, or try to re-initilize if it fails.
      
      Reviewers: bgamari, RyanGlScott, simonmar, hvr
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie, carter
      
      GHC Trac Issues: #9868, #10355, #13137, #13607, #13531
      
      Differential Revision: https://phabricator.haskell.org/D5012
      4fc6524a
    • Krzysztof Gogolewski's avatar
      Testsuite driver: fix encoding issue when calling ghc-pkg · 36a4c194
      Krzysztof Gogolewski authored
      Summary:
      In Python 3, subprocess.communicate() returns a pair of bytes, which
      need to be decoded. In runtests.py, we were just calling str() instead,
      which converts b'x' to "b'x'". As a result, the loop that was checking
      pkginfo for lines starting with 'library-dirs' couldn't work.
      
      Reviewers: bgamari, thomie, Phyx
      
      Reviewed By: thomie
      
      Subscribers: Phyx, rwbarton, carter
      
      Differential Revision: https://phabricator.haskell.org/D5046
      36a4c194
    • thomie's avatar
      Strip ../ from testdir (fixes #15469) · 29dfb636
      thomie authored
      Test Plan: Harbormaster
      
      Reviewers: bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, carter
      
      GHC Trac Issues: #15469
      
      Differential Revision: https://phabricator.haskell.org/D5039
      29dfb636
    • Michael Sloan's avatar
      Use -fobject-code in the GHCi script for loading GHC · e94cc29e
      Michael Sloan authored
      Summary:
      My very last commit to D4904 removed -fobject-code.  I should have tested this
      more thoroughly, because it is required to do a fresh ghci load, as some code
      uses unboxed tuples.
      
      One of my motivations for doing this was that if you run the script without
      passing -odir / -hidir, it would pollute the source tree with .hi and .o files.
      This also appeared to break subsequent builds. I've made it much less likely
      that this will happen by instead specifying -odir and -hidir within the ghci
      script rather than on the commandline.
      
      I plan to open a separate diff which adds a test that these scripts work.
      
      Until this patch is merged, the workaround is to do `./utils/ghc-in-ghci/run.sh -fobject-code`
      
      Reviewers: bgamari, alpmestan, monoidal
      
      Reviewed By: alpmestan, monoidal
      
      Subscribers: alpmestan, rwbarton, thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D5015
      e94cc29e
    • Joachim Breitner's avatar
      f811685c
    • Ryan Scott's avatar
      Move 8.8.1-notes.rst to the right directory · b14040db
      Ryan Scott authored
      Somehow, this escaped my notice before.
      b14040db
    • Ryan Scott's avatar
      Create 8.8.1 release notes · d7bc05ec
      Ryan Scott authored
      Summary:
      I have some pending commits which will debut in GHC 8.8.1,
      but we don't yet have release notes for this. This adds them, and
      deletes the stale 8.4.1 and 8.4.2 release notes.
      
      Test Plan: Read it
      
      Reviewers: bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D5025
      d7bc05ec
    • Joachim Breitner's avatar
      Allow scoped type variables refer to types · 4d91cabc
      Joachim Breitner authored
      This patch implements GHC proposal 29:
      (sorry, URL is too long for the commit message linter)
      and fixess #15050.
      
      The change is simple: Just use a different meta variable form.
      
      Test suite and documentation updated.
      
      Differential Revision: https://phabricator.haskell.org/D4980
      4d91cabc
  2. 05 Aug, 2018 4 commits
  3. 04 Aug, 2018 1 commit
  4. 03 Aug, 2018 3 commits
  5. 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
      generalizing.
      
      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.
      c955a514
    • Herbert Valerio Riedel's avatar
      Remove obsolete file · c50574a8
      Herbert Valerio Riedel authored
      This was missed by 0960a378
      
      [skip ci]
      c50574a8
  6. 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: https://phabricator.haskell.org/D5022
      120cc9f8
    • 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
      following:
      
      * 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: https://phabricator.haskell.org/D5017
      7f3cb50d
    • 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: https://phabricator.haskell.org/D5021
      b803c406
    • 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: https://phabricator.haskell.org/D4937
      52065e95
    • 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
      separately.
      
      Test case: dependent/should_fail/T15380
      f8618a9b
    • 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.
      1df50a0f
    • Ben Gamari's avatar
      rts: Fix unused function · 9bd48643
      Ben Gamari authored
      9bd48643
  7. 31 Jul, 2018 9 commits
  8. 30 Jul, 2018 2 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
      conclusions.
      
      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
      8.6.
      
      (cherry picked from commit 404bf05e)
      56590db0
    • Josh Price's avatar
      a698bbfe