1. 03 Aug, 2018 1 commit
  2. 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
  3. 01 Aug, 2018 7 commits
    • Vladislav Zavialov's avatar
      Fix #15415 and simplify tcWildCardBinders · 120cc9f8
      Vladislav Zavialov authored and Ben Gamari's avatar Ben Gamari committed
      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 and Ben Gamari's avatar Ben Gamari committed
      `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 and Ben Gamari's avatar Ben Gamari committed
      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 and Ben Gamari's avatar Ben Gamari committed
      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
  4. 31 Jul, 2018 9 commits
  5. 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
      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
      Fix minor formatting issue in users_guide/bugs.rst · a698bbfe
      Josh Price authored and Ben Gamari's avatar Ben Gamari committed
      a698bbfe
    • Ben Gamari's avatar
      Bump terminfo submodule to 0.4.1.2 · c6262464
      Ben Gamari authored
      c6262464
    • Roland Senn's avatar
      GHC doesn't handle ./ prefixed paths correctly (#12674) · a7c8acda
      Roland Senn authored and Tamar Christina's avatar Tamar Christina committed
      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: https://phabricator.haskell.org/D5009
      a7c8acda
    • Ryan Scott's avatar
      Fix #15385 by using addDictsDs in matchGuards · 9d388eb8
      Ryan Scott authored
      Summary:
      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: https://phabricator.haskell.org/D4968
      9d388eb8
  6. 29 Jul, 2018 1 commit
    • Ningning Xie's avatar
      Fix #15453: bug in ForAllCo case in opt_trans_rule · 11de4380
      Ningning Xie authored and Krzysztof Gogolewski's avatar Krzysztof Gogolewski committed
      Summary:
      Given
      
      ```
      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: https://phabricator.haskell.org/D5018
      11de4380
  7. 28 Jul, 2018 1 commit
  8. 27 Jul, 2018 14 commits
    • Krzysztof Gogolewski's avatar
      Fix Ar crashing on odd-sized object files (Trac #15396) · 754c3a55
      Krzysztof Gogolewski authored
      Summary: All the work was done by Moritz Angermann.
      
      Test Plan: validate
      
      Reviewers: angerman, RyanGlScott, bgamari
      
      Reviewed By: angerman
      
      Subscribers: rwbarton, thomie, carter
      
      GHC Trac Issues: #15396
      
      Differential Revision: https://phabricator.haskell.org/D5013
      754c3a55
    • Krzysztof Gogolewski's avatar
      Remove dead code in testsuite driver · 2cb08d72
      Krzysztof Gogolewski authored
      Test Plan: validate
      
      Reviewers: bgamari, O7 GHC - Testsuite
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D4972
      2cb08d72
    • Peter Trommler's avatar
      Fix endian issues in ghc-heap · d7cb1bbc
      Peter Trommler authored and Ben Gamari's avatar Ben Gamari committed
      In test heap_all arity and n_args were swapped on big endian
      systems.
      
      Take care of endianness when reading parts of a machine word
      from a `Word`.
      
      This fixes one out of 36 failing tests reported in #15399.
      
      Test Plan: validate
      
      Reviewers: simonmar, bgamari, hvr, erikd
      
      Reviewed By: simonmar
      
      Subscribers: rwbarton, thomie, carter
      
      GHC Trac Issues: #15399
      
      Differential Revision: https://phabricator.haskell.org/D5001
      d7cb1bbc
    • Ben Gamari's avatar
      Disable GNUC_ATTR_HOT when compiling with DEBUG · 40e9ec98
      Ben Gamari authored and Ben Gamari's avatar Ben Gamari committed
      Test Plan: Validate
      
      Reviewers: simonmar
      
      Reviewed By: simonmar
      
      Subscribers: rwbarton, thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D5000
      40e9ec98
    • Ben Gamari's avatar
      rts: More forceful cc debugging flags · ccdc0328
      Ben Gamari authored and Ben Gamari's avatar Ben Gamari committed
      Reviewers: simonmar, alpmestan
      
      Reviewed By: alpmestan
      
      Subscribers: rwbarton, thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D4999
      ccdc0328
    • Michael Sloan's avatar
      Modifications to support loading GHC into GHCi · 60ecf43a
      Michael Sloan authored and Ben Gamari's avatar Ben Gamari committed
      This change was previously part of
      [D4904](https://phabricator.haskell.org/D4904), but is being split off
      to aid in getting this reviewed and merged.
      
      * The compiler code is built with `NoImplicitPrelude`, but GHCi's
        modules are incompatible with it. So, this adds the pragma to all GHCi
        modules that didn't have it, and adds imports of Prelude.
      
      * In order to run GHC within itself, a `call of 'initGCStatistics`
        needed to be skipped. This uses CPP to skip it when
        `-DGHC_LOADED_INTO_GHCI` is set.
      
      * There is an environment variable workaround suggested by Ben Gamari
        [1], where `_GHC_TOP_DIR` can be used to specify GHC's top dir if `-B`
        isn't provided.  This can be used to solve a problem where the GHC being
        run within GHCi attempts to look in `inplace/lib/lib/` instead of
        `inplace/lib/`.
      
      [1]: https://phabricator.haskell.org/D4904#135438
      
      Reviewers: goldfire, bgamari, erikd, alpmestan
      
      Reviewed By: alpmestan
      
      Subscribers: alpmestan, lelf, rwbarton, thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D4986
      60ecf43a
    • Ningning Xie's avatar
      update core-spec for GRefl and re-factored Refl · e5f3de2c
      Ningning Xie authored and Ben Gamari's avatar Ben Gamari committed
      Ticket #15192 introduced the generalized reflexive coercion `GRefl` and
      nominal reflexive `Refl`, and removed `CoherenceCo`. Update core-spec
      accordingly.  Not sure about notations though; suggestions on more
      concise notations would be great.
      
      Test Plan: Read core-spec.pdf
      
      Reviewers: goldfire, bgamari
      
      Reviewed By: goldfire
      
      Subscribers: rwbarton, thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D4984
      e5f3de2c
    • Krzysztof Gogolewski's avatar
      Add an expect_broken test for #14185 · 3581212e
      Krzysztof Gogolewski authored and Ben Gamari's avatar Ben Gamari committed
      Test Plan: validate
      
      Reviewers: goldfire, bgamari, alpmestan
      
      Reviewed By: alpmestan
      
      Subscribers: rwbarton, thomie, carter
      
      GHC Trac Issues: #14185
      
      Differential Revision: https://phabricator.haskell.org/D4981
      3581212e
    • Simon Marlow's avatar
      Fix gcCAFs() · e431d75f
      Simon Marlow authored and Ben Gamari's avatar Ben Gamari committed
      The test here should have been changed after D1106.  It was harmless
      but we caught fewer GC'd CAFs than we should have.
      
      Test Plan:
      Using `nofib/imaginary/primes` compiled with `-debug`.
      
      Before:
      ```
      > ./primes 100 +RTS -G1 -A32k -DG
      CAF gc'd at 0x0x7b0960
      CAF gc'd at 0x0x788728
      CAF gc'd at 0x0x790db0
      CAF gc'd at 0x0x790de0
      12 CAFs live
      CAF gc'd at 0x0x788880
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      547
      CAF gc'd at 0x0x7995c8
      13 CAFs live
      ```
      
      After:
      
      ```
      > ./primes 100 +RTS -G1 -A32k -DG
      CAF gc'd at 0x0x7b0960
      CAF gc'd at 0x0x788728
      CAF gc'd at 0x0x790db0
      CAF gc'd at 0x0x790de0
      12 CAFs live
      CAF gc'd at 0x0x788880
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      12 CAFs live
      547
      CAF gc'd at 0x0x7995c8
      CAF gc'd at 0x0x790ea0
      12 CAFs live
      ```
      
      Reviewers: bgamari, osa1, erikd, noamz
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D4963
      e431d75f
    • Ömer Sinan Ağacan's avatar
      Run StgCse after unarise, fixes #15300 · 3c311e50
      Ömer Sinan Ağacan authored and Ben Gamari's avatar Ben Gamari committed
      Given two unboxed sum terms:
      
          (# 1 | #) :: (# Int | Int# #)
          (# 1 | #) :: (# Int | Int  #)
      
      These two terms are not equal as they unarise to different unboxed
      tuples. However StgCse was thinking that these are equal, and replacing
      one of these with a binder to the other.
      
      To not deal with unboxed sums in StgCse we now do it after unarise. For
      StgCse to maintain post-unarise invariants we factor-out case binder
      in-scopeness check to `stgCaseBndrInScope` and use it in StgCse.
      
      Also did some refactoring in SimplStg.
      
      Another way to fix this would be adding a special case in StgCse to not
      bring unboxed sum binders in scope:
      
          diff --git a/compiler/simplStg/StgCse.hs
      b/compiler/simplStg/StgCse.hs
          index 6c740ca4cb..93a0f8f6ad 100644
          --- a/compiler/simplStg/StgCse.hs
          +++ b/compiler/simplStg/StgCse.hs
          @@ -332,7 +332,11 @@ stgCseExpr env (StgLetNoEscape binds body)
           stgCseAlt :: CseEnv -> OutId -> InStgAlt -> OutStgAlt
           stgCseAlt env case_bndr (DataAlt dataCon, args, rhs)
               = let (env1, args') = substBndrs env args
          -          env2 = addDataCon case_bndr dataCon (map StgVarArg
      args') env1
          +          env2
          +            | isUnboxedSumCon dataCon
          +            = env1
          +            | otherwise
          +            = addDataCon case_bndr dataCon (map StgVarArg args')
      env1
                       -- see note [Case 2: CSEing case binders]
                     rhs' = stgCseExpr env2 rhs
                 in (DataAlt dataCon, args', rhs')
      
      I think this patch seems better in that it doesn't add a special case to
      StgCse.
      
      Test Plan:
      Validate.
      
      I tried to come up with a minimal example but failed. I thought a simple
      program like
      
          data T = T (# Int | Int #) (# Int# | Int #)
      
          case T (# 1 | #) (# 1 | #) of ...
      
      should be enough to trigger this bug, but for some reason StgCse
      doesn't do
      anything on this program.
      
      Reviewers: simonpj, bgamari
      
      Reviewed By: simonpj
      
      Subscribers: rwbarton, thomie, carter
      
      GHC Trac Issues: #15300
      
      Differential Revision: https://phabricator.haskell.org/D4962
      3c311e50
    • Michael Sloan's avatar
      Fail instead of panic-ing when qAddTopDecls has conversion error · 774f366e
      Michael Sloan authored and Ben Gamari's avatar Ben Gamari committed
      See https://ghc.haskell.org/trac/ghc/ticket/14627 for an example where
      GHC panics when using qAddTopDecls on [d| f = Bool |]. Instead, it
      should be a normal error message, and that's what this change is for. It
      does not entirely resolve Trac#14627, since "Illegal variable name:
      'bool'" isn't a very good error for this cirumstance.
      
      Test Plan: Manually tested.
      
      Reviewers: goldfire, bgamari
      
      Reviewed By: goldfire
      
      Subscribers: rwbarton, thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D4914
      774f366e
    • Michael Sloan's avatar
      Add a script for running a ghci that can load and run ghc · 13d40ff6
      Michael Sloan authored and Ben Gamari's avatar Ben Gamari committed
      Add scripts and .ghci files for loading GHC into GHCi
      
      Major credit to Csongor Kiss who wrote nearly all of settings.ghci
      
      Some small modifications to GHC are needed to make this work, and this
      diff depends on [D4986](https://phabricator.haskell.org/D4986) being
      merged.
      
      Test Plan:
      Manual for now. I have some thoughts on how to run the entire testsuite
      against
      GHC-in-GHCi.
      
      Reviewers: alpmestan, mpickering, goldfire, bgamari, erikd
      
      Reviewed By: alpmestan
      
      Subscribers: rwbarton, thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D4904
      13d40ff6
    • Simon Jakobi's avatar
      Make :doc work for the ghc library · 25e1ea99
      Simon Jakobi authored and Ben Gamari's avatar Ben Gamari committed
      We already include -haddock in the GhcLibHcOpts in order to include
      the boot libraries' docs in their .hi-files.
      
      By including -haddock in the GhcStage2HcOpts and GhcStage3HcOpts, we
      make the docs for the ghc library also available to the GHCi :doc
      command.
      
      Reviewers: bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D4913
      25e1ea99
    • Mitsutoshi Aoe's avatar
      rts: Flush eventlog in hs_init_ghc (fixes #15440) · 7a3e1b25
      Mitsutoshi Aoe authored and Ben Gamari's avatar Ben Gamari committed
      Without this change RTS typically doesn't flush some important
      events until the process terminates or it doesn't write them at
      all in case it terminates abnormally.
      
      Here is a list of such events:
      
      * EVENT_WALL_CLOCK_TIME
      * EVENT_OS_PROCESS_PID
      * EVENT_OS_PROCESS_PPID
      * EVENT_RTS_IDENTIFIER
      * EVENT_PROGRAM_ARGS
      * EVENT_PROGRAM_ENV
      7a3e1b25