- 01 May, 2015 4 commits
-
-
Simon Peyton Jones authored
See Note [Deriveds do rewrite Deriveds]. The important point is that we want to maintain the Note [Can-rewrite relation] property, lest we risk loops.
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
This makes TupleTyCon into an ordinary AlgTyCon, distinguished by its AlgTyConRhs, rather than a separate constructor of TyCon. It is preparatory work for making constraint tuples into classes, for which the ConstraintTuple tuples will have a TyConParent of a ClassTyCon. Tuples didn't have this possiblity before. The patch affects other modules because I eliminated the unsatisfactory partial functions tupleTyConBoxity and tupleTyConSort. And tupleTyConArity which is just tyConArity.
-
Simon Peyton Jones authored
-
- 30 Apr, 2015 3 commits
-
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
Gabor Greif authored
-
Simon Peyton Jones authored
Previously (Trac #10351) we could get Non type-variable argument in the constraint: C [t] (Use FlexibleContexts to permit this) When checking that `f' has the inferred type f :: forall t. C [t] => t -> () which is a bit stupid: we have *inferred* a type that we immediately *reject*. This patch arranges that that the generalisation mechanism (TcSimplify.decideQuantification) doesn't pick a predicate that will be rejected by the subsequent validity check. This forced some minor refactoring, as usual.
-
- 29 Apr, 2015 7 commits
-
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
Fixed by the patch for #10009
-
Simon Peyton Jones authored
This regrettably-big patch substantially improves the way in which "improvement" happens in the constraint solver. It was triggered by trying to crack Trac #10009, but it turned out to solve #10340 as well. The big picture, with several of the trickiest examples, is described in Note [The improvement story] in TcInteract. The major change is this: * After solving we explicitly try "improvement", by - making the unsolved Wanteds into Deriveds - allowing Deriveds to rewrite Deriveds This more aggressive rewriting "unlocks" some extra guess-free unifications. * The main loop is in TcInteract.solveSimpleWanteds, but I also ended up refactoring TcSimplify.simpl_loop, and its surrounding code. Notably, any insolubles from the Givens are pulled out and treated separately, rather than staying in the inert set during the solveSimpleWanteds loop. There are a lot of follow-on changes * Do not emit generate Derived improvements from Wanteds. This saves work in the common case where they aren't needed. * For improvement we should really do type-class reduction on Derived constraints in doTopReactDict. That entailed changing the GenInst constructor a bit; a local and minor change * Some annoying faffing about with dropping derived constraints; see dropDerivedWC, dropDerivedSimples, dropDerivedInsols, and their Notes. * Some substantial refactoring in TcErrors.reportWanteds. This work wasn't strictly forced, but I got sucked into it. All the changes are in TcErrors. * Use TcS.unifyTyVar consistently, rather than setWantedTyBind, so that unifications are properly tracked. * Refactoring around solveWantedsTcM, solveWantedsAndDrop. They previously guaranteed a zonked result, but it's more straightforward for clients to zonk.
-
Simon Peyton Jones authored
Because when flattening a Derived constraint, the evidence doesn't exist (it's an error thunk)
-
Simon Peyton Jones authored
I had 'ev' where I should have had 'new_ev'. It's quite hard to make this bug cause a failure, but I did eventually get a Lint error somewhere. Anyway, it's just a typo, I think.
-
Simon Peyton Jones authored
Seed SpecConstr based on *local* calls as well as *RHS* calls. See Note [Seeding top-level recursive groups]. The change here is mentioned here: NB: before Apr 15 we used (a) only, but Dimitrios had an example where (b) was crucial, so I added that. This is a pretty small change, requested by Dimitrios, that adds SpecConstr call patterns from the rest of the module, as well as ones from the RHS. Still to come: #10346.
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
- 27 Apr, 2015 3 commits
-
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
- 25 Apr, 2015 3 commits
-
-
Ben Gamari authored
This was an unfortunate oversight in the original event manager rework patch. Fixes #10308 Differential Revision: https://phabricator.haskell.org/D845
-
Herbert Valerio Riedel authored
See also #9049
-
Herbert Valerio Riedel authored
This is needed because GHC 7.10.2 requires a minor version bump to base-4.8.1.0 Several test outputs needed base-4.8.1.0 replaced by base-4.8.2.0
-
- 24 Apr, 2015 8 commits
-
-
Edward Z. Yang authored
Includes lots of shaping examples, and a shaping algorithm description. Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
eir@cis.upenn.edu authored
Test case: roles/should_compile/T9204b
-
eir@cis.upenn.edu authored
-
eir@cis.upenn.edu authored
-
eir@cis.upenn.edu authored
This adapts the work of Christiaan Baaij to present a sensible operational semantics for FC with mutual recursion.
-
eir@cis.upenn.edu authored
During this commit, I tested to make sure that CoreLint actually catches the Core error if the typechecker doesn't. Test case: typecheck/should_fail/T10285
-
eir@cis.upenn.edu authored
Fix #10263.
-
Joachim Breitner authored
by eta-expanding its definition so that GHC optmizes the foldl here. Also make sure that other uses of last go via foldl as well, to allow list fusion (tested in T9339). Fixes #10260.
-
- 22 Apr, 2015 12 commits
-
-
Joachim Breitner authored
(Next time, when fixing someone else’s mistake, I really shouldn’t do the precise same thing.)
-
Joachim Breitner authored
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
In response to suggestions on Trac #10281
-
Simon Peyton Jones authored
Don't suggest -XImpredicativeTypes; and document its flakiness Fixes Trac #10325
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
More fallout from the silent-superclass refactoring; nothing drastic. Fixes Trac #10335.
-
Edward Z. Yang authored
Summary: hs-boot declarations were leaking into the EPS due to self {-# SOURCE #-} imports, and interface loading induced by orphan instances. For the former, we simply disallow self {-# SOURCE #-} imports; for the latter, we simply just don't load an interface if it would be ourself. Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D860 GHC Trac Issues: #10182
-
Edward Z. Yang authored
Summary: It's kind of buggy, c.f. #10182, and isn't motivated by any real world programs, so we're going to get rid of it (despite it being handy for GHC test cases.) Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D862
-
Joachim Breitner authored
as Simons recent commit 9b9fc4c7 fixed this.
-
Simon Peyton Jones authored
We really don't want to unify (a b) with (Eq a => ty). The ever-ingenious Oerjan discovered this problem; see comment:101 in Trac #9858. See Note [Decomposing fat arrow c=>t] in Type.hs
-
Simon Peyton Jones authored
In TcRnDriver.checkHiBootIface' we were generating an impedence-matching binding $fxToRecMaybe = $fToRecMaybe but the type of the former was gotten from the *hi-boot* file, so its type constructor was not fully fleshed out. That should never happen. Fix is easy, happily. A dark corner.
-