1. 12 Jun, 2019 1 commit
  2. 11 Jun, 2019 13 commits
    • Alp Mestanogullari's avatar
      testsuite/mk/boilerplate.mk: rename 'ghc-config-mk' to 'ghc_config_mk' · aad6115a
      Alp Mestanogullari authored
      Make/shell variable names which contain dashes can cause problems under
      some conditions. The 'ghc-config-mk' variable from testsuite/mk/boilerplate.mk
      that I made overridable (by Hadrian) in ba0aed2e was working as expected when
      our Hadrian/Linux job was based off the deb8 Docker image, but broke when
      I switched the job to use our deb9-based image, in 3d97bad6. The exact
      circumstances/tool versions that trigger this problem are unknown, but
      changing the variable's name to 'ghc_config_mk' lets us work around the issue.
      This fixes the annth_compunits and annth_make test failures that showed up
      when we switched the Hadrian/Linux job to use the deb9 environment.
    • Ömer Sinan Ağacan's avatar
    • Ben Gamari's avatar
      rts/linker: Use mmapForLinker to map PLT · 0b7f81f5
      Ben Gamari authored
      The PLT needs to be located within a close distance of
      the code calling it under the small memory model.
      Fixes #16784.
    • Ben Gamari's avatar
      rts/linker: Mmap into low memory on AArch64 · cf7f36ae
      Ben Gamari authored
      This extends mmapForLinker to use the same low-memory mapping
      strategy used on x86_64 on AArch64. See #16784.
    • Alp Mestanogullari's avatar
      Hadrian: teach the RTS that PROFILING implies TRACING · 457fe789
      Alp Mestanogullari authored
      As discussed in #16744, both the Make and Hadrian build systems
      have special code to always pass -eventlog whenever -prof or -debug
      are passed. However, there is some similar logic in the RTS itself only
      for defining TRACING when the DEBUG macro is defined, but no such logic
      is implemented to define TRACING when the PROFILING macro is defined.
      This patch adds such a logic and therefore fixes #16744.
    • Alp Mestanogullari's avatar
    • Alec Theriault's avatar
      Make `haddock_testsuite` respect `--test-accept` · 45616133
      Alec Theriault authored
      Suppose you've made changes that affect the output of `haddockHtmlTest`
      so that the following is failing:
          ./hadrian/build.sh -c --only=haddockHtmlTest test
      Then, the following will accept new output for Haddock's test cases.
          ./hadrian/build.sh -c --only=haddockHtmlTest test --test-accept
      You still do need to make sure those new changes (which show up in
      Haddock's tree) get committed though.
      Fixes #16694
    • Alp Mestanogullari's avatar
      Refine the GHCI macro into HAVE[_{INTERNAL, EXTERNAL}]_INTERPRETER · 39f50bff
      Alp Mestanogullari authored
      As discussed in #16331, the GHCI macro, defined through 'ghci' flags
      in ghc.cabal.in, ghc-bin.cabal.in and ghci.cabal.in, is supposed to indicate
      whether GHC is built with support for an internal interpreter, that runs in
      the same process. It is however overloaded in a few places to mean
      "there is an interpreter available", regardless of whether it's an internal
      or external interpreter.
      For the sake of clarity and with the hope of more easily being able to
      build stage 1 GHCs with external interpreter support, this patch splits
      the previous GHCI macro into 3 different ones:
      - HAVE_INTERNAL_INTERPRETER: GHC is built with an internal interpreter
      - HAVE_EXTERNAL_INTERPRETER: GHC is built with support for external interpreters
    • Yuras's avatar
      Warn about unused packages · fe7e7e4a
      Yuras authored
      Reviewers: bgamari, simonpj
      Reviewed By: simonpj
      Subscribers: hvr, simonpj, mpickering, rwbarton, carter
      GHC Trac Issues: #15838
      Differential Revision: https://phabricator.haskell.org/D5285
    • Ben Gamari's avatar
      ghc-heap: Add closure_size_noopt test · e5d275f4
      Ben Gamari authored
      This adds a new test, only run in the `normal` way, to verify the size
      of FUNs and PAPs.
    • Ben Gamari's avatar
      testsuite: Fix and extend closure_size test · 2f945086
      Ben Gamari authored
      This was previously broken in several ways. This is fixed and it also
      now tests arrays. Unfortunately I was unable to find a way to continue
      testing PAP and FUN sizes; these simply depend too much upon the
      behavior of the simplifier.
      I also tried to extend this to test non-empty arrays as well but
      unfortunately this was non-trivial as the array card size constant isn't
      readily available from haskell.
      Fixes #16531.
    • David Eichmann's avatar
      Refactor the rules for .hi and .o into a single rule using `&%>` #16764 · 58a5d728
      David Eichmann authored
      Currently the rule for .hi files just triggers (via need) the rule
      for the .o file, and .o rule generates both the .o and .hi file.
      Likewise for .o-boot and .hi-boot files. This is a bit of an abuse
      of Shake, and in fact shake supports rules with multiple output
      with the &%> function. This exact use case appears in Neil
      Mitchell's paper *Shake Before Building* section 6.3.
    • Richard Eisenberg's avatar
  3. 10 Jun, 2019 2 commits
  4. 09 Jun, 2019 16 commits
    • Daniel Gröber (dxld)'s avatar
      rts: Fix RetainerProfile early return with TREC_CHUNK · 8e60e3f0
      Daniel Gröber (dxld) authored
      When pop() returns with `*c == NULL` retainerProfile will immediately
      return. All other code paths is pop() continue with the next stackElement
      when this happens so it seems weird to me that TREC_CHUNK we would suddenly
      abort everything even though the stack might still have elements left to
    • John Ericson's avatar
      Remove CPP ensuring word size is 32 or 64 bits around Addr# <-> int# primops · 5023adce
      John Ericson authored
      It shouldn't be needed these days, and those primops are "highly
      deprecated" anyways.
      This fits with my plans because it removes one bit of target-dependence
      of the builtin primops, and this is the hardest part of GHC to make
      CC @carter
    • Richard Eisenberg's avatar
    • David Eichmann's avatar
      Hadrian: need CPP preprocessor dependencies #16660 · 69c58f8a
      David Eichmann authored
      Use the new -include-cpp-deps ghc option (#16521)
      when generating .dependencies files in hadrian.
      This is version gated as -include-cpp-deps is a
      relatively new option.
    • Ben Gamari's avatar
      testsuite: Add test for #16509 · 8a48a8a4
      Ben Gamari authored
    • Alex D's avatar
      Do not report error if Name in pragma is unbound · ed20412a
      Alex D authored
    • Ben Gamari's avatar
      rts: Separate population of eventTypes from initial event generation · 13572480
      Ben Gamari authored
      Previously these two orthogonal concerns were both implemented in
      postHeaderEvents which made it difficult to send header events after RTS
    • Roland Senn's avatar
      Add disable/enable commands to ghci debugger #2215 · 10452959
      Roland Senn authored
      This patch adds two new commands `:enable` and `:disable` to the GHCi debugger.
      Opposite to `:set stop <n> :continue` a breakpoint disabled with `:disable` will
      not loose its previously set stop command.
      A new field breakEnabled is added to the BreakLocation data structure to
      track the enable/disable state. When a breakpoint is disabled with a `:disable`
      command, the following happens:
      The corresponding BreakLocation data element is searched dictionary of the
      `breaks` field of the GHCiStateMonad. If the break point is found and not
      already in the disabled state, the breakpoint is removed from bytecode.
      The BreakLocation data structure is kept in the breaks list and the new
      breakEnabled field is set to false.
      The `:enable` command works similar.
      The breaks field in the GHCiStateMonad was changed from an association list
      to int `IntMap`.
    • Richard Eisenberg's avatar
      Fix #16517 by bumping the TcLevel for method sigs · a22e51ea
      Richard Eisenberg authored
      There were actually two bugs fixed here:
      1. candidateQTyVarsOfType needs to be careful that it does not
         try to zap metavariables from an outer scope as "naughty"
         quantification candidates. This commit adds a simple check
         to avoid doing so.
      2. We weren't bumping the TcLevel in kcHsKindSig, which was used
         only for class method sigs. This mistake led to the acceptance
           class C a where
             meth :: forall k. Proxy (a :: k) -> ()
         Note that k is *locally* quantified. This patch fixes the
         problem by using tcClassSigType, which correctly bumps the
         level. It's a bit inefficient because tcClassSigType does other
         work, too, but it would be tedious to repeat much of the code
         there with only a few changes. This version works well and is
      And, while updating comments, etc., I noticed that tcRnType was
      missing a pushTcLevel, leading to #16767, which this patch also
      fixes, by bumping the level. In the refactoring here, I also
      use solveEqualities. This initially failed ghci/scripts/T15415,
      but that was fixed by teaching solveEqualities to respect
      This patch also cleans up some Notes around error generation that
      came up in conversation.
      Test case: typecheck/should_fail/T16517, ghci/scripts/T16767
    • KevinBuhr's avatar
      Handle trailing path separator in package DB names (#16360) · 9d238791
      KevinBuhr authored
      Package DB directories with trailing separator (provided via
      GHC_PACKAGE_PATH or via -package-db) resulted in incorrect calculation of
      ${pkgroot} substitution variable.  Keep the trailing separator while
      resolving as directory or file, but remove it before dropping the last
      path component with takeDirectory.
      Closes #16360.
    • Simon Jakobi's avatar
      Small refactorings in ExtractDocs · b9fe91fc
      Simon Jakobi authored
    • Ben Gamari's avatar
      testsuite: Add test for #16514 · 41bf4045
      Ben Gamari authored
    • chessai's avatar
      Introduce log1p and expm1 primops · f7370333
      chessai authored
      Previously log and exp were primitives yet log1p and expm1 were FFI
      calls. Fix this non-uniformity.
    • Ben Gamari's avatar
      testsuite: Suppress ticks in T4918 output · a018c3a8
      Ben Gamari authored
      As noted in #16741, this test otherwise breaks when `base` is compiled
      with `-g`.
    • Matthew Pickering's avatar
      hadrian: Properly partition options in sourceArgs · 970e4802
      Matthew Pickering authored
      Previously if you build the `ghc` package then it would has the default
      opts and the library opts. This is different behaviour to make where the
      library opts are only reserved for things in the `libraries`
      subdirectory (I believe)
      Fixes #16716
    • Alexandre R. Baldé's avatar
  5. 08 Jun, 2019 8 commits
    • Ben Gamari's avatar
      gitlab-ci: Ensure that all commits on a branch are submodule-linted · 87540029
      Ben Gamari authored
      The previous commit reworked things such that the submodule linter would
      only run on the head commit. However, the linter only checks the
      submodules which are touched by the commits it is asked to lint.
      Consequently it would be possible for a bad submodule to sneak through.
      Thankfully, we can use the handy CI_COMMIT_BEFORE_SHA attribute to
      find the base commit of the push.
    • Ben Gamari's avatar
      gitlab-ci: Fix submodule linting of commits · 4a72259d
      Ben Gamari authored
      There is no notion of a base commit when we aren't checking a merge
      request. Just check the HEAD commit.
    • Ben Gamari's avatar
      gitlab-ci: Disable shallow clones · b2f106f5
      Ben Gamari authored
      Previously we were passing `--unshallow` to `git fetch` in the linting
      rules to ensure that the base commit which we were linting with respect
      to was available. However, this breaks due to GitLab's re-use of
      working directories since `git fetch --unshallow` fails on a repository
      which is not currently shallow.
      Given that `git fetch --unshallow` circumvents the efficiencies provided
      by shallow clones anyways, let's just disable them entirely.
      There is no documented way to do disable shallow clones but on checking
      the GitLab implementation it seems that setting `GIT_DEPTH=0` should do
      the trick.
    • Matthew Pickering's avatar
      Remove trailing whitespace · 709290b0
      Matthew Pickering authored
      [skip ci]
      This should really be caught by the linters! (#16711)
    • Ben Gamari's avatar
      gitlab-ci: A few clarifying comments · c392f987
      Ben Gamari authored
    • Ben Gamari's avatar
      gitlab-ci: Fix submodule linter · f58234ea
      Ben Gamari authored
      The job script didn't even try to compute the base commit to lint with
      respect to.
    • Ben Gamari's avatar
      gitlab-ci: Use --unshallow when fetching for linters · fe965316
      Ben Gamari authored
      GitLab creates a shallow clone. However, this means that we may not have
      the base commit of an MR when linting, causing `git merge-base` to fail.
      Fix this by passing `--unshallow` to `git fetch`, ensuring that we have
      the entire history.
    • Matthew Pickering's avatar