- Mar 29, 2017
-
-
Simon Peyton Jones authored
This partly fixes Trac #13441, at least for the explicitly bidirectional case. See Note [Checking against a pattern signature], the part about "Existential type variables". Alas, the implicitly-bidirectional case is still not quite right, but at least there is a workaround by making it explicitly bidirectional. (cherry picked from commit 7c7479d0)
-
Simon Peyton Jones authored
(cherry picked from commit 7e1c492d)
-
Simon Peyton Jones authored
I was getting docs/users_guide/glasgow_exts.rst:12783: WARNING: Title underline too short. ``COLUMN`` pragma --------------- So I lengthened the row of hyphens. (cherry picked from commit af33073c)
-
Simon Peyton Jones authored
In fixing Trac #13337, and introducing solveSomeEqualities, Richard introduce the higher-order function tc_hs_sig_type_x, with a solver as its argument. It turned out that there was a much simpler way to do the same thing, which this patch implements. Less code, easier to grok. No change in behaviour though. (cherry picked from commit 1e06d8b8)
-
Test Plan: validate Reviewers: bgamari, austin, erikd Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3387 (cherry picked from commit c77551ab)
-
Summary: See comments for details. Test Plan: validate Reviewers: mpickering, bgamari, austin, erikd Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3386 (cherry picked from commit 074d13eb)
-
Ben Gamari authored
This fixes #13489. (cherry picked from commit b04ded8f)
-
* In stg_ap_0_fast, if we're evaluating a thunk, the thunk might evaluate to a function in which case we may have to adjust its CCS. * The interpreter has its own implementation of stg_ap_0_fast, so we have to do the same shenanigans with creating empty PAPs and copying PAPs there. * GHCi creates Cost Centres as children of CCS_MAIN, which enterFunCCS() wrongly assumed to imply that they were CAFs. Now we use the is_caf flag for this, which we have to correctly initialise when we create a Cost Centre in GHCi. (cherry picked from commit 3a18baff)
-
I forgot to account for BCOs, which have a different layout from functions. This caused crashes when using profiling with GHCi (via -fexternal-interpreter -prof), which unfortunately is not tested at all by validate, even when profiling is enabled. I'm going to add some testing that would have caught this in a separate patch. Test Plan: ``` cd nofib/spectral/puzzle && make NoFibWithGHCi=YES EXTRA_RUNTEST_OPTS='-fexternal-interpreter -prof' ``` New testsuite tests coming in a separate diff. Reviewers: niteria, austin, erikd, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2868 GHC Trac Issues: #5654 (cherry picked from commit 2a02040b)
-
This fixes some cases of wrong stacks being generated by the profiler. For background and details on the fix see `Note [Evaluating functions with profiling]` in `rts/Apply.cmm`. This does have an impact on allocations for some programs when profiling. nofib results: ``` k-nucleotide +0.0% +8.8% +11.0% +11.0% 0.0% puzzle +0.0% +12.5% 0.244 0.246 0.0% typecheck 0.0% +8.7% +16.1% +16.2% 0.0% ------------------------------------------------------------------------ -------- Min -0.0% -0.0% -34.4% -35.5% -25.0% Max +0.0% +12.5% +48.9% +49.4% +10.6% Geometric Mean +0.0% +0.6% +2.0% +1.8% -0.3% ``` But runtimes don't seem to be affected much, and the examples I looked at were completely legitimate. For example, in puzzle we have this: ``` position :: ItemType -> StateType -> BankType position Bono = bonoPos position Edge = edgePos position Larry = larryPos position Adam = adamPos ``` where the identifiers on the rhs are all record selectors. Previously the profiler gave a stack that looked like ``` position bonoPos ... ``` i.e. `bonoPos` was at the same level of the call stack as `position`, but now it looks like ``` position bonoPos ... ``` I used the normaliser from the testsuite to diff the profiling output from other nofib programs and they all looked better. Test Plan: * the broken test passes * validate * compiled and ran all of nofib, measured perf, diff'd several .prof files Reviewers: niteria, erikd, austin, scpmw, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2804 GHC Trac Issues: #5654, #10007 (cherry picked from commit 394231b3)
-
As #13479 shows, there are corner cases where the simplifier decides to not eta-expand a function as much as its call arity would suggest, but instead transforms the code that the call arity annotation becomes a lie. As the call arity information is only meant to be used by the immediatelly following simplifier run, it makes sense to simply zap the information there. Differential Revision: https://phabricator.haskell.org/D3390 (cherry picked from commit e07211f7)
-
- Mar 27, 2017
-
-
Simon Peyton Jones authored
In initTc, if the computation fails with an exception, we should not complain about unsolved constraints. Fixes Trac #13466. (cherry picked from commit feca929b)
-
Ben Gamari authored
(cherry picked from commit d5847cfe)
-
Ben Gamari authored
See #13481. (cherry picked from commit 140a2d1c)
-
Ben Gamari authored
Otherwise we run it in the hpc way, which outputs different Core. (cherry picked from commit 23da02b1)
-
Test Plan: validate Reviewers: austin, bgamari, dfeuer Reviewed By: dfeuer Subscribers: dfeuer, thomie Differential Revision: https://phabricator.haskell.org/D3368 (cherry picked from commit 14b46a55)
-
Ben Gamari authored
(cherry picked from commit a1b7e866)
-
Ben Gamari authored
(cherry picked from commit 6d774ff2)
-
Ben Gamari authored
The output of the test overflows. Given that the result is stable regardless of whether it overflows, I just made the expected output word-size dependent. (cherry picked from commit aecbfb90)
-
Ben Gamari authored
The formatting strings fell out of sync with the arguments. (cherry picked from commit 94ec48f8)
-
Ben Gamari authored
Fixes DumpTypecheckedAst output on 32-bit platforms. (cherry picked from commit bc9f280a)
-
Ben Gamari authored
(cherry picked from commit ff6ee998)
-
Ben Gamari authored
(cherry picked from commit be8122ab)
-
Ben Gamari authored
Thanks to Ryan Scott for the example. (cherry picked from commit 27c9a7d0)
-
Edward Z. Yang authored
Test Plan: none Reviewers: bgamari, austin, dfeuer Reviewed By: bgamari, dfeuer Subscribers: dfeuer, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3357 (cherry picked from commit ee7241cf)
-
Adam Steen reported build failure on OpenBSD: rts/linker/Elf.c:402:0: error: error: 'EM_PPC64' undeclared (first use in this function) case EM_PPC64: IF_DEBUG(linker,debugBelch( "powerpc64" )); OpenBSD-6.0 does not define EM_PPC64: /usr/include/sys/exec_elf.h:#define EM_PPC 20 /* PowerPC */ Reported-by:
Adam Steen <adam@adamsteen.com.au> Signed-off-by:
Sergei Trofimovich <slyfox@gentoo.org> (cherry picked from commit 6c73504a)
-
- Mar 24, 2017
-
-
My commit bdb0c43c optimized the encoding of instructions to test tag bits, but it did not always set exactly the same condition codes since the testb instruction does a single-byte comparison, rather than a full-word comparison. It would be correct to optimize the expression `x .&. 128 > 0` to the sequence testb $128, %al seta %al ; note: 'a' for unsigned comparison, ; not 'g' for signed comparison but the pretty-printer is not the right place to make this kind of context-sensitive optimization. Test Plan: harbormaster Reviewers: trofi, austin, bgamari, dfeuer Reviewed By: trofi, dfeuer Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3359 (cherry picked from commit caf94b06)
-
Reviewers: austin, hvr, erikd Reviewed By: erikd Subscribers: rwbarton, thomie, erikd, snowleopard Differential Revision: https://phabricator.haskell.org/D3367 (cherry picked from commit 1b374402)
-
Allow customization of diagnostic colors through the GHC_COLORS environment variable. Some color-related code have been refactored to PprColour to reduce the circular dependence between DynFlags, Outputable, ErrUtils. Some color functions that were part of Outputable but were never used have been deleted. Test Plan: validate Reviewers: austin, hvr, bgamari, dfeuer Reviewed By: bgamari, dfeuer Subscribers: dfeuer, rwbarton, thomie, snowleopard Differential Revision: https://phabricator.haskell.org/D3364 (cherry picked from commit adf27d61)
-
- Mar 23, 2017
-
-
Ben Gamari authored
-
- Mar 22, 2017
-
-
Edward Z. Yang authored
Summary: When I originally implemented ABI-based shadowing as per ee4e1654, I switched our strategy from pasting together lists to creating a map of all units first, and then selecting packages from this. However, what I did not realize when doing this was that we actually depended on the *ordering* of these lists later, when we selected a preferred package to use. The crux is if I have -package-db db1 -package-db db2 -package p-0.1, and p-0.1 is provided by both db1 and db2, which one does the -package flag select? Previously, this was undetermined; now we always select the instance from the LATEST package database. (If p-0.1 shows up multiple times in the same database, once again the chosen package is undefined.) The reason why cabal08 intermittently failed was that, in practice, we were sorting on the UnitId, so when we bumped version numbers, that often wibbled the UnitIds so that they compared oppositely. I've extended the test so that we check that the relation is antisymmetric. Fixes #13313 Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: bgamari, austin Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3369 (cherry picked from commit e0eaea91)
-
David Feuer authored
* Make `unsafeInterleaveST` use `noDuplicate#` like `unsafeInterleaveIO` does to prevent the suspended action from being run in two threads. * In order to accomplish this without `unsafeCoerce#`, generalize the type of `noDuplicate#`. * Add `unsafeDupableInterleaveST` to get the old behavior. * Document unsafe `ST` functions and clean up some related documentation. Fixes #13457 Reviewers: austin, hvr, bgamari, ekmett Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3370 (cherry picked from commit 30d68d63)
-
- Mar 21, 2017
-
-
Summary: Fix some `-Werror` failures and work around a bug in the `x86` version of `mingw-w64-crt`'s libraries. The bump in the `win32` submodule is required for this. Test Plan: ./validate Reviewers: austin, bgamari, erikd, simonmar Reviewed By: simonmar Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3362 (cherry picked from commit 713ff920)
-
Ben Gamari authored
(cherry picked from commit 9c041294)
-
Simon Peyton Jones authored
The main payload of this patch is NOT to make a join-point from a function with an INLINE pragma and the wrong arity; see Note [Join points and INLINE pragmas] in CoreOpt. This is what caused Trac #13413. But we must do the exact same thing in simpleOptExpr, which drove me to the following refactoring: * Move simpleOptExpr and simpleOptPgm from CoreSubst to a new module CoreOpt along with a few others (exprIsConApp_maybe, pushCoArg, etc) This eliminates a module loop altogether (delete CoreArity.hs-boot), and stops CoreSubst getting too huge. * Rename Simplify.matchOrConvertToJoinPoint to joinPointBinding_maybe Move it to the new CoreOpt Use it in simpleOptExpr as well as in Simplify * Define CoreArity.joinRhsArity and use it (cherry picked from commit a7dbafe9)
-
Simon Peyton Jones authored
Better location info if the error is in an unfolding (cherry picked from commit 567bc6bd)
-
(cherry picked from commit 66d174a9)
-
I had thought that it was necessary to solve kind-level equalities before validity-checking a type, but I was wrong. This patch simply deletes code. Hooray! (cherry picked from commit 3cfee57a)
-
test case: typecheck/should_compile/T13343 (cherry picked from commit 02cc8f0c)
-
test cases: ghci/scripts/T13202{,a} (cherry picked from commit fa13c136)
-