- Jan 09, 2014
-
-
Joachim Breitner authored
This is an attempt to use the by-products of nested cpr analysis.
-
Joachim Breitner authored
-
Joachim Breitner authored
by giving it the meaning: "Assuming my first argument is terminating, then I am terminating". In pictures: This is the lattice, which is not a simple product lattice any more: ------ <L><L>------ / | \ \ / | <L><L>t \ <S><L> | <S><L> | \ \ | | | \ | \ <S><L>t | / | <S><L>t | \ | / | \ \ | / | \ ----- <S><S>----- | \ | \ | \ | <S><S>t / \ | / ---------⊥-------------/ This means that we need to be careful when lub’ing: If one branch is lazy, but not absent in an argument or free variable, and the other branch is strict, then even if both branches claim to terminate, we need to remove the termination flag (as one had the termination under a stronger hypothesis as the hole result) (Feels inelegant.) There is no unit for lubDmdType any more. So for case, use we use botDmdType for no alternatives, and foldr1 if there are multiple. Unlifted variables (e.g. Int#) are tricky. Everything is strict in them, so for an *unlifted* argument, <L>t implies <S>t and hence <S>t ⊔ <L>t = <S>t, and we really want to make use of that stronger equation. But when lub’ing, we don’t know any more if this is the demand for an unlifted type. So instead, the demand type of x :: Int# itself is {x ↦ <L>} t, while x :: Int continues to have type {x ↦ <S>} t. It is important that functions (including primitive operations and constructors like I#) have a strict demand on their unlifted argument. But it turned out to be easier to enforce this in the demand analyser: So even if f claims to have a lazy demand on a argument of unlifted type, we make this demand strict before feeding it into the argument.
-
- Dec 16, 2013
-
-
Joachim Breitner authored
because this is the right-identity to `bothDmdResult`, and this is the right thing to do in a lazy context.
-
Joachim Breitner authored
to detect definite convergence (required for nested CPR).
-
Joachim Breitner authored
by only passing the demand on the free variables, and whether the argument (resp. scrunitee) may or will diverge.
-
Joachim Breitner authored
Make different postProcess code paths for function arguments (which are post-processed just to be both'ed) and unsaturated functions (which are post-processed for other reasons.)
-
Joachim Breitner authored
its first argument is just used for its length (the arity of the call). So changing the type to Int to reflect that. Also add a note [Demands from unsaturated function calls] that hopefully comprehensively and comprehensibly explains what is going on here.
-
Joachim Breitner authored
-
Joachim Breitner authored
-
Joachim Breitner authored
this is a small-step-refactoring patch and not very interesting on its own.
-
Joachim Breitner authored
-
Joachim Breitner authored
-
Joachim Breitner authored
by adding Notes and using easier to understand combinators.
-
- Dec 12, 2013
-
-
Joachim Breitner authored
-
Joachim and I are committing this onto a branch so that we can share it, but we expect to do a bit more work before merging it onto head. Nofib staus: - Most programs, no change - A few improve - A couple get worse (cacheprof, tak, rfib) Investigating the "get worse" set is what's holding up putting this on head. The major issue is this. Consider map (f g) ys where f's demand signature looks like f :: <L,C1(C1(U))> -> <L,U> -> . So 'f' is not saturated. What demand do we place on g? Answer C(C1(U)) That is, the inner C1 should stay, even though f is not saturated. I found that this made a significant difference in the demand signatures inferred in GHC.IO, which uses lots of higher-order exception handlers. I also had to add used-once demand signatures for some of the 'catch' primops, so that we know their handlers are only called once.
-
This patch was authored by SPJ and extracted from "Improve the handling of used-once stuff" by Joachim.
-
This patch was authored by SPJ, and extracted from "Improve the handling of used-once stuff" by Joachim.
-
This is authored by SPJ, and split out out "Improve the handling of used-once stuff" by Joachim.
-
This was authored by SPJ and extracted from the "Improve the handling of used-once stuff" patch by Joachim.
-
- Dec 10, 2013
-
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
This is a long-standing bug. We were generating a Given equality between kind variables, and (at least until we support kind coercions) we can't do that. The fix is to drop such Given equalities entirely. That may mean we can't prove some things, but that's fair enough -- the current proof language can't express such proofs. See Note [Do not create Given kind equalities] in TcSMonad
-
Herbert Valerio Riedel authored
Signed-off-by:
Herbert Valerio Riedel <hvr@gnu.org>
-
- Dec 09, 2013
-
-
Joachim Breitner authored
-
Joachim Breitner authored
because it is not a top deman (see previous commit), and it is only used in an argument to mkStrictSig.
-
Joachim Breitner authored
because topDmdType is ''not'' the top of the lattice, as it puts an implicit absent demand on free variables, but Abs is the bottom of the Usage lattice. Why nopDmdType? Becuase it is the demand of doing nothing: Everything lazy, everything absent, no definite divergence.
-
Joachim Breitner authored
but do forget about certain divergence, if required. Fixes one part of ticket #8598. The added function (deferAfterIO) can maybe be merged with existing code, but given the ongoing work in the nested-cpr branch, I defer that work.
-
Joachim Breitner authored
The existing flag -ddump-stranal dumps the full Core, which is very verbose and not always helpful. This adds a more concise output (one line per top-level bind) that is faster to read, and especially more suitable to be used when writing test cases for the strictness analiser.
-
Austin Seipp authored
On win64 sizeof(long) != sizeof(void*), so debugTrace was casting a value of incorrect size causing a validate failure. Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
- Dec 05, 2013
-
-
Herbert Valerio Riedel authored
This improves the output of `git shortlog` and others, see http://git-scm.com/docs/git-shortlog for more details. The mapping is in part derived from the Darcs author-spelling file which was removed some time ago via 47a01802. There's still a couple of unmapped `<unknown>` authors in the Git history which will be hopefully mapped in the future as well to provide complete authorship information throughout all of GHC's recorded development history. Signed-off-by:
Herbert Valerio Riedel <hvr@gnu.org>
-
parcs authored
-
parcs authored
The lexer now uses unicode single quotation marks in its error messages if possible. This is due to the use of the 'quotes' combinator.
-
Simon Peyton Jones authored
This was an egregious error. If e :: T (Q ty1) then when we have the splice $e :: ty2 we must ensure that ty1~ty2 before we even think about running the splice! I took the opportunity to remove the dead-code tcSpliceDecls altogether.
-
Simon Peyton Jones authored
-
Christopher Rodrigues authored
Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
Evan Hauck authored
Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
Evan Hauck authored
Signed-off-by:
Austin Seipp <austin@well-typed.com>