- Sep 30, 2016
-
-
Simon Peyton Jones authored
This test uses wholesale impredicative polymorphism, and now fails. That's ok.
-
Simon Peyton Jones authored
..accidentally omitted from previous commit.
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
This patch fixes Trac #12616. Dignosis. In TcUnify.tc_sub_type_ds we were going to some trouble to support co- and contra-variance even for impredicative types. With -XImpredicativeTYpes, this allowed a unification variable to be unified with a polytype (probably wrongly) and that caused later trouble in the constraint solver, where -XImpredicativeTypes was /not/ on. In effect, -XImpredicativeTypes can't be switched on locally. Why did we want ImpredicativeTypes locally? Because the program generated by GND for a higher-rank method involved impredicative instantation of 'coerce': op = coerce op -- where op has a higher rank type See Note [Newtype-deriving instances] in TcGenDeriv. Cure. 1. It is ghastly to rely on ImpredicativeTypes (a 100% flaky feature) to instantiate coerce polymorphically. Happily we now have Visible Type Application, so I've used that instead which should be solid and reliable. 2. I deleted the code in tc_sub_type_ds that allows the constraint solver to "look through" a unification variable to find a polytype. That used to be essential in the days of ReturnTv, but it's utterly unreliable and should be consigned to the dustbin of history. (We have ExpType now for the essential uses.) Tests involving ImpredicativeTypes are affected, but I'm not worried about them... it's advertised as a feature you can't rely on, and I want to reform it outright.
-
Simon Peyton Jones authored
...just for debug output
-
Simon Peyton Jones authored
1. Trac #12593 exposed a long-standing bug in the occurs checking machinery. When unifying two type variables a ~ b where a /= b, we were assuming that there could be no occurs-check error. But there can: 'a' can occur in b's kind! When the RHS was a non-tyvar we used occurCheckExpand, which /did/ look in kinds, but not when the RHS was a tyvar. This bug has been lurking ever since TypeInType, maybe longer. And it was present both in TcUnify (the on-the-fly unifier), and in TcInteract. I ended up refactoring both so that the tyvar/tyvar path naturally goes through the same occurs-check as non-tyvar rhss. It's simpler and more robust now. One good thing is that both unifiers now share TcType.swapOverVars TcType.canSolveByUnification previously they had different logic for the same goals 2. Fixing this bug exposed another! In T11635 we end up unifying (alpha :: forall k. k->*) ~ (beta :: forall k. k->*) Now that the occurs check is done for tyvars too, we look inside beta's kind. And then reject the program becuase of the forall inside there. But in fact that forall is fine -- it does not count as impredicative polymoprhism. See Note [Checking for foralls] in TcType. 3. All this fuss around occurrence checking forced me to look at TcUnify.checkTauTvUpdate and TcType.occurCheckExpand There's a lot of duplication there, and I managed to elminate quite a bit of it. For example, checkTauTvUpdate called a local 'defer_me'; and then called occurCheckExpand, which then used a very similar 'fast_check'. Things are better, but there is more to do.
-
Simon Peyton Jones authored
This patch fixes Trac #12595. The problem was with a pattern binding like !x = e For a start it's silly to match that pattern and build a unit tuple (the General Case of mkSelectorBinds); but that's what was happening because the bang fell through to the general case. But for a variable pattern building any auxiliary bindings is stupid. So the patch introduces a new case in mkSelectorBinds for variable patterns. Then it turned out that if 'e' was a plain variable, and moreover was imported GlobalId, then matchSinglePat made it a /bound/ variable, which should never happen. That ultimately caused a linker error, but the original bug was much earlier.
-
Simon Peyton Jones authored
-
- Sep 29, 2016
-
-
Ömer Sinan Ağacan authored
-
Simon Peyton Jones authored
-
- Sep 28, 2016
-
-
Gabor Greif authored
-
- Sep 27, 2016
-
-
Erik de Castro Lopo authored
This prevents the possibility of race conditions when creating fresh names. Test Plan: validate Reviewers: goldfire, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2548
-
- Sep 26, 2016
-
-
Ömer Sinan Ağacan authored
With this patch we stop generating virtual semicolons in MultiWayIf guards. Fixes #10807. Test Plan: Reviewers: simonmar, austin, bgamari Reviewed By: simonmar Subscribers: mpickering, thomie Differential Revision: https://phabricator.haskell.org/D2524 GHC Trac Issues: #10807
-
Joachim Breitner authored
__GLASGOW_HASKELL is a typo (should be __GLASGOW_HASKELL__), obviously, but nobody noticed.
-
Simon Peyton Jones authored
This fixes Trac #12597: in RnNames.warnMissingSignatures, use pprSigmaType not pprType
-
- Sep 24, 2016
-
-
Matthew Pickering authored
-
Joachim Breitner authored
-
Joachim Breitner authored
as the latter is the official, correct spelling, and the former just a misspelling accepted by GHC. Also document in the user’s guide that the alternative spelling is accepted This commit was brough to you by HIW 2016.
-
- Sep 23, 2016
-
-
Matthew Pickering authored
It is a self-recursive function so will always be the loop-breaker and hence never able to be inlined. It is dubious whether the INLINABLE pragma will ever help as it is not a very polymorphic function but some specialisation could occur.
-
Richard Eisenberg authored
The problem is described in the ticket. This patch adds new variants of the access points to the pure unifier that allow unification of types only when the caller wants this behavior. (The unifier used to also unify kinds.) This behavior is appropriate when the kinds are either already known to be the same, or the list of types provided are a list of well-typed arguments to some type constructor. In the latter case, unifying earlier types in the list will unify the kinds of any later (dependent) types. At use sites, I went through and chose the unification function according to the criteria above. This patch includes some modest performance improvements as we are now doing less work.
-
Simon Marlow authored
We had better docs for the underlying functions in GHC.ForeignPtr, but this wasn't propagated to the re-exported versions in Foreign.Concurrent.
-
Simon Marlow authored
Summary: And document it. See the docmentation for the reason I want this. Test Plan: It's an existing API, just exposing it. Reviewers: bgamari, niteria, austin, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2531
-
Simon Marlow authored
If we want to keep the RTS alive a bit longer by having another hs_init()/hs_exit() pair in a library that will destruct itself after main() has exited, then the forced shutdown here thwarts that. I think we just "fixed" #5402 in the wrong way before, this should be better.
-
- Sep 21, 2016
-
-
Tamar Christina authored
Summary: Test T12504 does it's checking in the Makefile using grep but still specified an stdout. the stdout has the old output and would always fail. Since the stdout isn't needed, let's not check it. Test Plan: make test TEST=T12504 Reviewers: bgamari, austin, erikd, rcook Reviewed By: rcook Subscribers: thomie, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D2537 GHC Trac Issues: #12504
-
- Sep 20, 2016
-
-
Matthew Pickering authored
Fixes #12519
-
Ömer Sinan Ağacan authored
New unarise (714bebff) eliminates void binders in patterns already, so no need to eliminate them here. I leave assertions to make sure this is the case. Assertion failure -> bug in unarise Reviewers: bgamari, simonpj, austin, simonmar, hvr Reviewed By: simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2416
-
- Sep 16, 2016
-
-
Previously this was a relative path which worked in the GHC tree, but failed elsewhere. This caused trouble for out-of-tree users as well as Hadrian, which wants to move build artifacts out of the working directory. Fixes #8040. Test Plan: Validate Reviewers: thomie, austin, snowleopard, hvr Reviewed By: snowleopard, hvr Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2530 GHC Trac Issues: #8040
-
- Sep 15, 2016
-
-
Joachim Breitner authored
basically using the machinery from the test case of #2110.
-
Simon Peyton Jones authored
See Note [Data for non-algebraic types]
-
Simon Peyton Jones authored
-
Ben Gamari authored
Here we introduce compatibility wrappers for HasCallStack constraints. This is necessary as we must support GHC 7.10.1 which lacks sane call stack support. We also introduce another constraint synonym, HasDebugCallStack, which only provides a call stack when DEBUG is set.
-
Simon Marlow authored
-
Simon Marlow authored
Summary: * getNonClobberedReg instead of getSomeReg, because the reg needs to survive across t_code * Use a new reg for the table offset calculation instead of clobbering the reg returned by expr (this was the bug affecting #12433) Test Plan: New unit test; validate Reviewers: rwbarton, bgamari, austin, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2529 GHC Trac Issues: #12433
-
- Sep 13, 2016
-
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
-
- Sep 12, 2016
-
-
Simon Peyton Jones authored
Sigh. I added some comments to the source files, and failed to revalidate. But the comments change the line number in the error messages. Doh.
-
Simon Peyton Jones authored
I must have failed to validate properly, sorry. These testsuite wibbles belong with commit 03541cba Author: Simon Peyton Jones <simonpj@microsoft.com> Date: Fri Sep 9 17:42:42 2016 +0100 Be less picky about reporing inaccessible code
-
Biographical profiling is not thread-safe as documented in #12019. Throw an error when it is used in this way. Test Plan: Validate Reviewers: simonmar, austin, erikd Reviewed By: erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2516 GHC Trac Issues: #12019
-
Ben Gamari authored
As requested in #10267. However we still lack support in typed splices. See #10945 and #10946.
-