1. 09 Mar, 2019 6 commits
  2. 08 Mar, 2019 7 commits
    • Roland Senn's avatar
    • Sylvain Henry's avatar
      TH: support raw bytes literals (#14741) · 224a6b86
      Sylvain Henry authored
      GHC represents String literals as ByteString internally for efficiency
      reasons. However, until now it wasn't possible to efficiently create
      large string literals with TH (e.g. to embed a file in a binary, cf #14741):
      TH code had to unpack the bytes into a [Word8] that GHC then had to re-pack
      into a ByteString.
      This patch adds the possibility to efficiently create a "string" literal
      from raw bytes. We get the following compile times for different sizes
      of TH created literals:
      || Size || Before || After  || Gain ||
      || 30K  || 2.307s || 2.299  || 0%   ||
      || 3M   || 3.073s || 2.400s || 21%  ||
      || 30M  || 8.517s || 3.390s || 60%  ||
      Ticket #14741 can be fixed if the original code uses this new TH feature.
    • Simon Peyton Jones's avatar
      Use captureTopConstraints in TcRnDriver calls · 5be7ad78
      Simon Peyton Jones authored
      Trac #16376 showed the danger of failing to report an error
      that exists only in the unsolved constraints, if an exception
      is raised (via failM).
      Well, the commit 5c1f268e (Fail fast in solveLocalEqualities)
      did just that -- i.e. it found errors in the constraints, and
      called failM to avoid a misleading cascade.
      So we need to be sure to call captureTopConstraints to report
      those insolubles.  This was wrong in TcRnDriver.tcRnExpr and
      in TcRnDriver.tcRnType.
      As a result the error messages from test T13466 improved slightly,
      a happy outcome.
    • Vladislav Zavialov's avatar
      Testsuite: use 'fragile' instead of 'skip' for T3424, T14697 · 82628254
      Vladislav Zavialov authored
      Also, replace some tabs with spaces to avoid a "mixed indent" warning that vim
      gives me.
    • Andrey Mokhov's avatar
      Hadrian: Drop remaining symlink traversal code from build scripts · 5d744143
      Andrey Mokhov authored
      This partly resolves #16325 (https://ghc.haskell.org/trac/ghc/ticket/16325).
      As previously discussed in https://github.com/snowleopard/hadrian/issues/667,
      we do not need the symlink traversal code in build scripts. However, it
      appears we forgot to delete this code from our Stack-based build scripts,
      which led to placing all build artefacts in an unexpected location when
      using Hadrian in combination with symlink trees. This commit fixes this.
    • Alp Mestanogullari's avatar
      Hadrian: various improvements around the 'test' rule · 48927a9a
      Alp Mestanogullari authored
      - introduce a -k/--keep-test-files flag to prevent cleanup
      - add -dstg-lint to the options that are always passed to tests
      - infer library ways from the compiler to be tested instead of getting them
        from the flavour (like make)
      - likewise for figuring out whether the compiler to be tested is "debugged"
      - specify config.exeext
      - correctly specify config.in_tree_compiler, instead of always passing True
      - fix formatting of how we pass a few test options
      - add (potential) extensions to check-* program names
      - build check-* programs with the compiler to be tested
      - set TEST_HC_OPTS_INTERACTIVE and PYTHON env vars when running tests
    • Sebastian Graf's avatar
      Always do the worker/wrapper split for NOINLINEs · 1675d40a
      Sebastian Graf authored
      Trac #10069 revealed that small NOINLINE functions didn't get split
      into worker and wrapper. This was due to `certainlyWillInline`
      saying that any unfoldings with a guidance of `UnfWhen` inline
      unconditionally. That isn't the case for NOINLINE functions, so we
      catch this case earlier now.
      Nofib results:
              Program         Allocs    Instrs
       fannkuch-redux          -0.3%      0.0%
                   gg          +0.0%     +0.1%
             maillist          -0.2%     -0.2%
              minimax           0.0%     -0.8%
                  Min          -0.3%     -0.8%
                  Max          +0.0%     +0.1%
       Geometric Mean          -0.0%     -0.0%
      Fixes #10069.
      Metric Increase:
  3. 07 Mar, 2019 8 commits
  4. 06 Mar, 2019 9 commits
    • Zejun Wu's avatar
      Move reifyGHCi function into GhciMonad type class · 3caeb443
      Zejun Wu authored
      This was the suggested change in !176 but missed the batch merge (!263).
    • Ryan Scott's avatar
      Fix #16385 by appending _maybe to a use of lookupGlobalOcc · 78dd04f9
      Ryan Scott authored
      `instance forall c. c` claimed that `c` was out of scope because the
      renamer was invoking `lookupGlobalOcc` on `c` (in
      `RnNames.getLocalNonValBinders`) without binding `c` first. To avoid
      this, this patch changes GHC to invoke `lookupGlobalOcc_maybe` on `c`
      instead, and if that returns `Nothing`, then bail out, resulting
      in a better error message.
    • Ben Gamari's avatar
      Fix it · a4944d8d
      Ben Gamari authored
    • Ömer Sinan Ağacan's avatar
      rts: Unglobalize dead_weak_ptr_list and resurrected_threads · 5aab1d9c
      Ömer Sinan Ağacan authored
      In the concurrent nonmoving collector we will need the ability to call
      `traverseWeakPtrList` concurrently with minor generation collections.
      This global state stands in the way of this. However, refactoring it
      away is straightforward since this list only persists the length of a
      single GC.
    • P.C. Shyamshankar's avatar
      Handle absolute paths to build roots in Hadrian. · 2ff77b98
      P.C. Shyamshankar authored
      Fixes #16187.
      This patch fixes various path concatenation issues to allow functioning
      builds with hadrian when the build root location is specified with an
      absolute path.
      - The path concatenation operator (-/-) now handles absolute second operands
        appropriately. Its behavior should match that of POSIX (</>) in this
      - The `getDirectoryFiles*` family of functions only searches for matches
        under the directory tree rooted by its first argument; all of the
        results are also relative to this root. If the first argument is the
        empty string, the current working directory is used.
        This patch passes the appropriate directory (almost always either `top`
        or `root`), and subsequently attaches that directory prefix so that
        the paths refer to the appropriate files.
      - Windows `tar` does not like colons (':') in paths to archive files, it
        tries to resolve them as remote paths. The `--force-local` option
        remedies this, and is applied on windows builds.
    • Ryan Scott's avatar
      Add regression test for #15918 · db039a4a
      Ryan Scott authored
      The test case in #15918 no longer triggers an `ASSERT` failure on
      GHC HEAD, likely due to commit
      68278382 (`Make a smart mkAppTyM`).
      This patch adds a regression test for #15918 to finally put it to
    • Ömer Sinan Ağacan's avatar
    • Ömer Sinan Ağacan's avatar
      rts/Printer: Introduce a few more printing utilities · 23342e1f
      Ömer Sinan Ağacan authored
      These include printLargeAndPinnedObjects, printWeakLists, and
      printStaticObjects. These are generally useful things to have.
    • Ben Gamari's avatar
      Rip out object splitting · 37f257af
      Ben Gamari authored
      The splitter is an evil Perl script that processes assembler code.
      Its job can be done better by the linker's --gc-sections flag. GHC
      passes this flag to the linker whenever -split-sections is passed on
      the command line.
      This is based on @DemiMarie's D2768.
      Fixes Trac #11315
      Fixes Trac #9832
      Fixes Trac #8964
      Fixes Trac #8685
      Fixes Trac #8629
  5. 05 Mar, 2019 3 commits
    • Krzysztof Gogolewski's avatar
      Fix map/coerce rule for newtypes with wrappers · 646b6dfb
      Krzysztof Gogolewski authored
      This addresses Trac #16208 by marking newtype wrapper
      unfoldings as compulsory.
      Furthermore, we can remove the special case for newtypes
      in exprIsConApp_maybe (introduced in 7833cf40).
    • David Eichmann's avatar
      Test Runner: don't show missing baseline warning for performance tests with... · 6c4e45b0
      David Eichmann authored
      Test Runner: don't show missing baseline warning for performance tests with expected changes on the current commit.
      Trac #16359
    • Simon Peyton Jones's avatar
      Be more careful when naming TyCon binders · 80dfcee6
      Simon Peyton Jones authored
      This patch fixes two rather gnarly test cases:
        * Trac #16342 (mutual recursion)
          See Note [Tricky scoping in generaliseTcTyCon]
        * Trac #16221 (shadowing)
          See Note [Unification variables need fresh Names]
      The main changes are:
      * Substantial reworking of TcTyClsDecls.generaliseTcTyCon
        This is the big change, and involves the rather tricky
        function TcHsSyn.zonkRecTyVarBndrs.
        See Note [Inferring kinds for type declarations] and
        Note [Tricky scoping in generaliseTcTyCon] for the details.
      * bindExplicitTKBndrs_Tv and bindImplicitTKBndrs_Tv both now
        allocate /freshly-named/ unification variables. Indeed, more
        generally, unification variables are always fresh; see
        Note [Unification variables need fresh Names] in TcMType
      * Clarify the role of tcTyConScopedTyVars.
        See Note [Scoped tyvars in a TcTyCon] in TyCon
      As usual, this dragged in some more refactoring:
      * Renamed TcMType.zonkTyCoVarBndr to zonkAndSkolemise
      * I renamed checkValidTelescope to checkTyConTelescope;
        it's only used on TyCons, and indeed takes a TyCon as argument.
      * I folded the slightly-mysterious reportFloatingKvs into
        checkTyConTelescope. (Previously all its calls immediately
        followed a call to checkTyConTelescope.)  It makes much more
        sense there.
      * I inlined some called-once functions to simplify
        checkValidTyFamEqn. It's less spaghetti-like now.
      * This patch also fixes Trac #16251.  I'm not quite sure why #16251
        went wrong in the first place, nor how this patch fixes it, but
        hey, it's good, and life is short.
  6. 04 Mar, 2019 5 commits
  7. 02 Mar, 2019 1 commit
  8. 01 Mar, 2019 1 commit