summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update comments: Void# instead of State# RealWorld#Joachim Breitner2013-12-161-3/+3
|
* Make types of bothDmdType more preciseJoachim Breitner2013-12-162-25/+39
| | | | | by only passing the demand on the free variables, and whether the argument (resp. scrunitee) may or will diverge.
* Disentangle postProcessDmdTypeM and postProcessUnsatJoachim Breitner2013-12-161-1/+13
| | | | | | 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.)
* Refactor peelManyCallsJoachim Breitner2013-12-161-18/+53
| | | | | | | | 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.
* Rename postProcessDmdType to postProcessUnsat and use* to reuse*Joachim Breitner2013-12-162-39/+46
|
* Do not export DmdResult constructors in Demand.lhsJoachim Breitner2013-12-162-12/+12
|
* Split DmdResult into DmdResult and CPRResultJoachim Breitner2013-12-163-72/+120
| | | | | this is a small-step-refactoring patch and not very interesting on its own.
* Add Note [non-algebraic or open body type warning]Joachim Breitner2013-12-161-0/+20
|
* Remove dmdAnalArg and replace by easier to understand codeJoachim Breitner2013-12-161-8/+8
|
* Clarify the default demand on demand environmentsJoachim Breitner2013-12-164-57/+70
| | | | by adding Notes and using easier to understand combinators.
* Move peelFV from DmdAnal to DemandJoachim Breitner2013-12-122-23/+29
|
* Improve the handling of used-once stuffSimon Peyton Jones2013-12-1212-224/+273
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Guarding against silly shiftsSimon Peyton Jones2013-12-121-12/+68
| | | | | This patch was authored by SPJ and extracted from "Improve the handling of used-once stuff" by Joachim.
* Assign strictness signatures to primitive operationsSimon Peyton Jones2013-12-122-3/+14
| | | | | This patch was authored by SPJ, and extracted from "Improve the handling of used-once stuff" by Joachim.
* Do not split void functionsSimon Peyton Jones2013-12-121-2/+20
| | | | | This is authored by SPJ, and split out out "Improve the handling of used-once stuff" by Joachim.
* Some refactoring of Demand and DmdAnalSimon Peyton Jones2013-12-124-158/+147
| | | | | This was authored by SPJ and extracted from the "Improve the handling of used-once stuff" patch by Joachim.
* Spelling in commentSimon Peyton Jones2013-12-101-1/+1
|
* Better debug printingSimon Peyton Jones2013-12-101-2/+2
|
* Do not generate given kind-equalities (fix Trac #8566)Simon Peyton Jones2013-12-103-40/+77
| | | | | | | | | | | | 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
* Add more .mailmap entriesHerbert Valerio Riedel2013-12-101-0/+60
| | | | Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Sort the output of -dump-strsigsJoachim Breitner2013-12-091-5/+8
|
* Replace mkTopDmdType by mkClosedStrictSigJoachim Breitner2013-12-097-21/+21
| | | | | because it is not a top deman (see previous commit), and it is only used in an argument to mkStrictSig.
* Rename topDmdType to nopDmdTypeJoachim Breitner2013-12-097-28/+34
| | | | | | | | | 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.
* Do not forget CPR information after an IO actionJoachim Breitner2013-12-092-2/+19
| | | | | | | | | 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.
* New flag: -ddump-strsigsJoachim Breitner2013-12-094-0/+30
| | | | | | | 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.
* Fix windows x86_64 build.Austin Seipp2013-12-091-1/+1
| | | | | | | 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>
* Remove the LFBlackHole constructorPatrick Palka2013-12-051-27/+0
| | | | After commit 55c703b8fdb0, this code is no longer used anywhere.
* Add `.mailmap` fileHerbert Valerio Riedel2013-12-051-0/+71
| | | | | | | | | | | | | | | | | 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 47a018026aee9faef28ddc9b4550425dd0000ceb. 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>
* Suggest TemplateHaskell after encountering a parse error on '$' (#7396)Patrick Palka2013-12-051-6/+10
|
* Clean up Lexer.srcParseErrPatrick Palka2013-12-051-5/+3
| | | | | The lexer now uses unicode single quotation marks in its error messages if possible. This is due to the use of the 'quotes' combinator.
* Suggest TemplateHaskell after encountering a naked top-level expressionPatrick Palka2013-12-051-0/+1
| | | | Helps fix #7396
* Typecheck typed TH splices properly (fix Trac #8577)Simon Peyton Jones2013-12-054-31/+22
| | | | | | | | | | | | | 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.
* Comments, and rename a variableSimon Peyton Jones2013-12-051-10/+28
|
* Fix compiler warnings due to integer size mismatchChristopher Rodrigues2013-12-041-2/+2
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Refactored by Simon Marlow's suggestionEvan Hauck2013-12-041-4/+2
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Made ghc -e have a nonzero exit code upon failure (Trac #7962 )khyperia2013-12-041-4/+10
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Use new flushExec implementation on all operating systems (#8562)Christopher Rodrigues2013-12-041-37/+19
| | | | | | | An earlier patch fixes a bug in flushExec on linux only. This patch uses the fixed code on all operating systems. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Update and deduplicate the comments on CAF management (#8590)Patrick Palka2013-12-042-37/+14
|
* Move the allocation of CAF blackholes into 'newCAF' (#8590)Patrick Palka2013-12-043-45/+39
| | | | | | | | | | We now do the allocation of the blackhole indirection closure inside the RTS procedure 'newCAF' instead of generating the allocation code inline in the closure body of each CAF. This slightly decreases code size in modules with a lot of CAFs. As a result of this change, for example, the size of DynFlags.o drops by ~60KB and HsExpr.o by ~100KB.
* Remove code that generates FunDep error message contextJoachim Breitner2013-12-042-45/+17
| | | | | as it seems that this code is now dead (due to [Dropping derived constraints]) (See #8592)
* Untab ClosureTypes.h and ClosureFlags.cPatrick Palka2013-12-042-79/+79
|
* Comments onlySimon Peyton Jones2013-12-042-8/+16
|
* Improve ASSERTSimon Peyton Jones2013-12-041-1/+1
|
* Comments onlySimon Peyton Jones2013-12-041-10/+9
|
* Fix note reference [WildCard binders]Joachim Breitner2013-12-041-1/+1
|
* More detailed error message when GND failsJoachim Breitner2013-12-044-14/+18
| | | | | we now print the precise class method, with types, where the coercion failed.
* Export getHscEnv from HscMainEdsko de Vries2013-12-031-1/+4
|
* Mask async exceptions in forkM_Edsko de Vries2013-12-032-2/+21
| | | | See #8006 for the reason why. This is not a fix as such; more of a workaround.
* Elaborate "deriving" error messagesJoachim Breitner2013-12-033-7/+16
| | | | | | If "deriving (C)" fails, it will now, if possible, indicate which particular field of which constructor has caused the failure. (This fixes #8576)
* Refactor: Origin of inferred ThetasJoachim Breitner2013-12-032-114/+168
| | | | | | When doing non-standalone deriving, annotate each individual unsimplified constraint with its own CtOrigin. This is just the refactoring, so the CtOrigin is still CtDeriv in each case.