- Mar 27, 2017
-
-
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)
-
In an effort to report multiple levity polymorphism errors all at once, the desugarer does not fail when encountering bad levity polymorphism. But we must be careful not to build the bad applications, lest they try to satisfy the let/app invariant and call isUnliftedType on a levity polymorphic type. This protects calls to mkCoreAppDs appropriately. test case: typecheck/should_fail/T12709 (cherry picked from commit dca44adb)
-
(cherry picked from commit 4dc99300)
-
- Mar 20, 2017
-
-
This is a more aggressive approach to the problem initially solved in f5b275a2, where top-level primitive string literals were being wrapped by ticks. This breaks the Core invariant descirbed in Note [CoreSyn top-level string literals]. However, the previous approach was incomplete and left several places where inappropriate ticks could sneak in. This commit kills the problem at the source: we simply never tick any primitive string literal expression. The assumption here is that these expressions are destined for the top-level, where they cannot be ticked, anyways. So even if they haven't been floated out yet there is no reason to tick them. This partially reverts commit f5b275a2. Test Plan: Validate with `-g` Reviewers: austin, scpmw, simonpj, simonmar, dfeuer Subscribers: dfeuer, simonmar, thomie Differential Revision: https://phabricator.haskell.org/D3063
-
- Mar 18, 2017
-
-
Ben Gamari authored
It looks like this was likely a cut-and-paste error.
-
Ben Gamari authored
This reverts commit 394231b3.
-
Ben Gamari authored
This reverts commit 2a02040b.
-
Ben Gamari authored
This reverts commit 3a18baff.
-
- Mar 15, 2017
-
-
Ben Gamari authored
(cherry picked from commit ba431051)
-
Reviewers: austin, hvr, bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3345 (cherry picked from commit 7e273ea2)
-
Ben Gamari authored
Fixes #13388. Also updates the expected output for T12504, which previously contained a redundant LINE pragma.
-
Ryan Scott authored
Summary: The section on `-XTypeApplications` in the users' guide isn't terribly clear on how to view the visibility of a function type signature's type variables in GHCi properly (i.e., using the `:type +v` GHCi command). This adds some more exposition that demonstrates how to use `:type +v` (and why you don't want to use `:type`). Fixes #13401. Test Plan: Eyeball it Reviewers: bgamari, austin, goldfire, crockeea Reviewed By: goldfire, crockeea Subscribers: rwbarton, thomie, crockeea Differential Revision: https://phabricator.haskell.org/D3310 (cherry picked from commit b335f506)
-
Ben Gamari authored
-
Ben Gamari authored
It seems I must have dropped the update of the expected value during a conflict resolution.
-
In Windows 10 Insiders build 15019+ which will probably be released mainstream somewhere this year Microsoft seems to have started being stricter with API calls. The call to `FreeConsole` just after `CreateProcess` is making Windows treat the process as an interactive process. In which case it tries to use the `Desktop session` but fails resulting in the cryptic error reported. I don't understand why the call to `FreeConsole` was there and it doesn't seem to be needed, so removed. This fixes #13411 Test Plan: ./validate, alternative just do anything with ghc which requires compilation. Reviewers: austin, bgamari, simonmar Reviewed By: bgamari Subscribers: rwbarton, thomie, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D3319 (cherry picked from commit 4b673e80)
-
The big change is the introduction of solveSomeEqualities. This is just like solveEqualities, but it doesn't fail if there are unsolved equalities when it's all done. Anything unsolved is re-emitted. This is appropriate if we are not kind-generalizing, so this new form is used when decideKindGeneralizationPlan says not to. We initially thought that any use of solveEqualities would be tied to kind generalization, but this isn't true. For example, we need to solveEqualities a bunch in the "tc" pass in TcTyClsDecls (which is really desugaring). These equalities are all surely going to be soluble (if they weren't the "kc" pass would fail), but we still need to solve them again. Perhaps if the "kc" pass produced type- checked output that is then desugared, solveEqualities really would be tied only to kind generalization. Updates haddock submodule. Test Plan: ./validate, typecheck/should_compile/T13337 Reviewers: simonpj, bgamari, austin Reviewed By: simonpj Subscribers: RyanGlScott, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3315 (cherry picked from commit e0c433c8)
-
Simon Peyton Jones authored
Trac #13381 showed that we were losing track of a wanted constraint when simplifying the LHS constraints for a RULE. This patch fixes it, makes the code a bit simpler, and better documented. (cherry picked from commit af6ed4a6)
-
Ben Gamari authored
-
Simon Peyton Jones authored
A very small refactoring (cherry picked from commit 2d3cb34a)
-
Simon Peyton Jones authored
In error messages like this • Couldn't match type ‘c’ with ‘f0 (a -> b)’ ‘c’ is a rigid type variable bound by the type signature for: f :: ((a -> b) -> b) -> forall c. c -> a we need to take case both to actually show that 'forall c', and to make sure that its name lines with the 'c' in the error message. This has been shaky for some time, and this commit puts it on solid ground. See TcRnTypes: Note [SigSkol SkolemInfo] The main changes are * SigSkol gets an extra field that records the way in which the type signature was skolemised. * The type in SigSkol is now the /un/-skolemised version * pprSkolemInfo uses the info to make the tidy type line up nicely Lots of error message wibbles! (cherry-picked from 48d1866e)
-
Ryan Scott authored
Summary: After 8136a5cb (#11450), if you have a class with an associated type: ``` class C a where type T a b ``` And you try to create an instance of `C` like this: ``` instance C Int where type T Int Char = Bool ``` Then it is rejected, since you're trying to instantiate the variable ``b`` with something other than a type variable. But this restriction proves quite onerous in practice, as it prevents you from doing things like this: ``` class C a where type T a (b :: Identity c) :: c instance C Int where type T Int ('Identity x) = x ``` You have to resort to an auxiliary type family in order to define this now, which becomes extremely tiring. This lifts this restriction and fixes #13398, in which it was discovered that adding this restriction broke code in the wild. Test Plan: ./validate Reviewers: simonpj, bgamari, austin Reviewed By: simonpj Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3302 (cherry picked from commit 67345ccf)
-
- Mar 14, 2017
-
-
Simon Peyton Jones authored
In this commit commit 02ac2974 Author: Simon Peyton Jones <simonpj@microsoft.com> Date: Wed Nov 16 10:37:47 2011 +0000 Fix CaseIdentity optimisaion In fixing one bug I'd introduced another; case x of { T -> T; F -> F } wasn't getting optmised! Trivial to fix. I introduced yet another! This line of code in SimplUtils.mkCase1 check_eq (Var v) (DataAlt con) [] = v == dataConWorkId con -- Optimisation only is patently false when arg_tys is non-empty. Astonishing that it has not shown up before now. Easily fixed though. This was all shown up by Trac #13417, which is now fixed. Merge to 8.0, 8.2.
-
- Mar 13, 2017
-
-
Test Plan: No new test (bug is latent) Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3285 (cherry picked from commit 08e73ccf)
-