- 08 Nov, 2006 1 commit
-
-
simonpj@microsoft.com authored
-
- 09 Nov, 2006 2 commits
-
-
Simon Marlow authored
-
Simon Marlow authored
-
- 08 Nov, 2006 1 commit
-
-
Simon Marlow authored
-
- 07 Nov, 2006 2 commits
-
-
simonpj@microsoft.com authored
The function insertStableSymbol looks utterly wrong, because it coerces a value of type 'a' to an Addr#! That was in turn making the code generator get confused (now improved), but since insertStableSymbol isn't used at all, I'm just commenting it out. Meanwhile, this patch also enhances CoreToStg to report the most egregious cases where an unsafe coerce is going to confuse the code generator.
-
simonpj@microsoft.com authored
-
- 06 Nov, 2006 3 commits
-
-
simonpj@microsoft.com authored
This is really a long-standing bug. See test mod177.
-
simonpj@microsoft.com authored
-
simonpj@microsoft.com authored
The new simplifer stuff exposed the fact that the invariants on the TvSubstEnv and IdSubstEnv were insufficiently explicit. (Resulted in a bug found by Sam Brosnon.) This patch fixes the bug, and tries to document the invariants pretty thoroughly. See Note [Extending the TvSubst] in Type Note [Extenting the Subst] in CoreSubst (Most of the new lines are comments.)
-
- 01 Nov, 2006 1 commit
-
-
SamB authored
Had to add support for dynamic C calls and for foreign labels (Addr# constants). Actually I only did the printing side -- parsing is not done yet. But at least now you can build the libraries with -fext-core. I also got the function arrow to print out properly again (it was printing fully-qualified and z-coded!) I also added a field for calling convention name to the External data constructor in ExternalCore.Exp (for static C calls). I'm not exactly sure where to document all of this, so I haven't done that, though I did comment the code a bit.
-
- 24 Oct, 2006 1 commit
-
-
Ian Lynagh authored
-
- 01 Nov, 2006 1 commit
-
-
simonpj@microsoft.com authored
This big patch completely overhauls the Simplifier. The simplifier had grown old and crufty, and was hard to understand and maintain. This new version is still quite complicated, because the simplifier does a lot, but it's much easier to understand, for me at least. It does mean that I have touched almost every line of the simplifier, so the diff is a large one. Big changes are these * When simplifying an Expr we generate a simplified Expr plus a bunch of "floats", which are bindings that have floated out of the Expr. Before, this float stuff was returned separately, but not they are embedded in the SimplEnv, which makes the plumbing much easier and more robust. In particular, the SimplEnv already meaintains the "in-scope set", and making that travel with the floats helps to ensure that we always use the right in-scope set. This change has a pervasive effect. * Rather than simplifying the args of a call before trying rules and inlining, we now defer simplifying the args until both rules and inlining have failed, so we're going to leave a call in the result. This avoids the risk of repeatedly simplifying an argument, which was handled by funny ad-hoc flags before. The downside is that we must apply the substitution to the args before rule-matching; and if thep rule doesn't match that is wasted work. But having any rules at all is the exception not the rule, and the substitution is lazy, so we only substitute until a no-match is found. The code is much more elegant though. * A SimplCont is now more zipper-like. It used to have an embedded function, but that was a bit hard to think about, and now it's nice and consistent. The relevant constructors are StrictArg and StrictBind * Each Rule now has an *arity* (gotten by CoreSyn.ruleArity), which tells how many arguments it matches against. This entailed adding a field ru_nargs to a BuiltinRule. And that made me look at PrelRules; I did quite a bit of refactoring in the end, so the diff in PrelRules looks much biggger than it really is. * A little refactoring in OccurAnal. The key change is that in the RHS of x = y `cast` co we regard 'y' as "many", so that it doesn't get inlined into the RHS of x. This allows x to be inlined elsewhere. It's very like the existing situation for x = Just y where we treat 'y' as "many".
-
- 02 Nov, 2006 5 commits
-
-
simonpj@microsoft.com authored
-
simonpj@microsoft.com authored
-
simonpj@microsoft.com authored
-
simonpj@microsoft.com authored
-
simonpj@microsoft.com authored
-
- 01 Nov, 2006 12 commits
-
-
sof@galois.com authored
-
sof@galois.com authored
-
simonpj@microsoft.com authored
-
simonpj@microsoft.com authored
This patch fixes a long standing bug, Trac #179, and a recently reported one, Trac #963. The problem in both cases was an unconstrained type variable 'a', of kind argTypeKind (printed "??") or openTypeKind ("?"). At top level we now default the kind of such variables to liftedTypeKind ("*"). This is important because then instance declarations can match it. The defaulting function is called TcMType.zonkTopTyVar, and is commented. (Most of the extra lines in the patch are comments!)
-
simonpj@microsoft.com authored
-
simonpj@microsoft.com authored
-
simonpj@microsoft.com authored
-
simonpj@microsoft.com authored
-
simonpj@microsoft.com authored
-
simonpj@microsoft.com authored
-
simonpj@microsoft.com authored
When doing the fixpoint iteration for 'deriving' we have to be careful not to end up in a loop, even if we have -fallow-undecidable-instances. Test is tcfail169
-
simonpj@microsoft.com authored
Worker/wrapper generation sometimes has to add a dummy void (State#) argument to retain laziness. But when generating the strictness signature for the worker, I forgot to take account of the extra argument, resulting in a bogus strictness signature. Result, chaos. Trac 317 shows this up, and this patch fixes it.
-
- 30 Oct, 2006 1 commit
-
-
simonpj@microsoft.com authored
-
- 27 Oct, 2006 4 commits
-
-
Simon Marlow authored
-
Simon Marlow authored
-
Simon Marlow authored
-
Simon Marlow authored
-
- 26 Oct, 2006 2 commits
-
-
Simon Marlow authored
-
Simon Marlow authored
-
- 25 Oct, 2006 1 commit
-
-
Simon Marlow authored
-
- 26 Oct, 2006 1 commit
-
-
Simon Marlow authored
Fixes stage 2 build with -fvia-C
-
- 25 Oct, 2006 2 commits
-
-
andy@galois.com authored
-
andy@galois.com authored
-