summaryrefslogtreecommitdiff
path: root/compiler
Commit message (Collapse)AuthorAgeFilesLines
* Switch on -dynamic-too with QuasiQuotes as well.Austin Seipp2014-02-191-1/+3
| | | | | | As pointed out by Albert Y. C. Lai on glasgow-haskell-users. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Call Arity refactoring: fakeBoringCallsJoachim Breitner2014-02-181-11/+6
|
* Support mutual recursionJoachim Breitner2014-02-181-49/+69
|
* Call arity: Handle type application correctlyJoachim Breitner2014-02-181-0/+6
|
* Call Arity: Now also done on Top-Level bindsJoachim Breitner2014-02-181-61/+80
|
* Call Arity refactoring: instance Outputable CountJoachim Breitner2014-02-181-0/+4
|
* Call Arity refactoring: Factor out callArityBoundJoachim Breitner2014-02-181-33/+38
|
* Call Arity refactoring: Use a product domainJoachim Breitner2014-02-181-53/+46
|
* Make CallArity make more use of many-callsJoachim Breitner2014-02-181-98/+124
| | | | by elaborating the domain a bit.
* Keep kind-inconsistent Given type equalities (fixes Trac #8705)Simon Peyton Jones2014-02-181-14/+20
| | | | | | | I was too eager when fixing Trac #8566, and dropped too many equalities on the floor, thereby causing Trac #8705. The fix is easy: delete code. Lots of new comments!
* Add some more traceTcS callsSimon Peyton Jones2014-02-181-3/+7
|
* Allow ($) to return an unlifted type (Trac #8739)Simon Peyton Jones2014-02-183-24/+48
| | | | | | | | | | | | Since ($) simply returns its result, via a tail call, it can perfectly well have an unlifted result type; e.g. foo $ True where foo :: Bool -> Int# should be perfectly fine. This used to work in GHC 7.2, but caused a Lint failure. This patch makes it work again (which involved removing code in TcExpr), but fixing the Lint failure meant I had to make ($) into a wired-in Id. Which is not hard to do (in MkId).
* Use NoGen plan for unboxed-tuple bindingsSimon Peyton Jones2014-02-183-72/+69
| | | | | There was a small mixup here, exposed by Trac #8762. Now clarified with better function names and comments.
* More liberally eta-expand a case-expressionJoachim Breitner2014-02-171-28/+9
| | | | | | at least with -fno-pedantic-bottoms. This fixes #2915, and undoes some of a522c3b, on the grounds that with a flag `-fpedantic-bottoms` around, we can be a bit more liberal when the flag is off..
* Fix #8770Austin Seipp2014-02-172-6/+15
| | | | | | | | | As usual, Mac OS X is extremely annoying (or the software is, anyway), because not only does it load dynamic libraries with the .dylib extension, but also the .so extension. For whatever reason. At least it's easy to fix. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Fix #8745 - GND is now -XSafe compatible.Austin Seipp2014-02-171-4/+1
| | | | | | | | | | | | | | As discussed in the ticket, after the landing of #8773, GND is now -XSafe compatible. This fixes the test fallout as well. In particular SafeLang07 was removed following in the steps of SafeLang06, since it no longer failed from GND, but failed due to roles and was thus invalid. The other tests were tweaked to use TemplateHaskell instead of GND in order to trigger safety warnings. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Fix --enable-unregistered by passing NOSMP to .hc compiler (#8748)Sergei Trofimovich2014-02-171-0/+5
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Fix #8773.Richard Eisenberg2014-02-131-0/+14
| | | | | | To make a role annotation on a class asserting a role other than nominal, you now need -XIncoherentInstances. See the ticket for more information as to why this is a good idea.
* Fix #5682. Now, '(:) parses.Richard Eisenberg2014-02-131-0/+2
|
* Remove space after ASSERT.Julian K. Arni2014-02-131-1/+1
| | | | Which on OS X leaves macro unexpanded.
* Fix some typos in commentsGabor Greif2014-02-132-4/+4
|
* Fix Manual hlinting patchJoachim Breitner2014-02-131-2/+2
|
* Manual hlinting: or (map f) = any fJoachim Breitner2014-02-132-3/+3
|
* Cleaned up Maybes.lhsBaldur Blöndal2014-02-1319-68/+42
|
* Remove eta-expansion in Rules.matchJoachim Breitner2014-02-111-8/+0
| | | | | | | It validates and nofib shows no change, so possibly dead code. Removing in the interest of code cleanliness, someone disagrees please revert (and preferably add a testcase, or at least describe the situation this is important in in a Note).
* Use exprIsLambda_maybe in matchJoachim Breitner2014-02-112-36/+85
| | | | | | | | | when matching a lambda in the template against an expression. When matching, look through coercions (only for value lambdas for now), and look through currently active unfoldings, if these are undersaturated, i.e. produce a lambda. This replaces the existing, somewhat fishy eta-expansion.
* Add Case TyConAppCo to match_coJoachim Breitner2014-02-111-3/+22
|
* In simpleOptExpr, unfold compulsary unfoldingsJoachim Breitner2014-02-111-0/+11
| | | | such as that of coerce.
* In CoreSubst, optimize Coercible values aggressivelyJoachim Breitner2014-02-111-2/+2
| | | | just like boxed type equalities.
* Replace forall'ed Coercible by ~R# in RULESJoachim Breitner2014-02-113-6/+54
| | | | | we want a rule "map coerce = coerce" to match the core generated for "map Age" (this is #2110).
* Note [Eta expansion in match]Joachim Breitner2014-02-101-0/+19
|
* Add a unit test for CallArityJoachim Breitner2014-02-101-0/+1
| | | | | | | | | This also sets precedence for testing internals of GHC directly, i.e. without trying to come up with Haskell code and observable effects. Let's see how that goes. I put all the tests (including those where the analysis could do better) in one file because starting the GHC API is quite slow.
* Implement CallArity analysisJoachim Breitner2014-02-1010-11/+509
| | | | | | | | | | | | | This analysis finds out if a let-bound expression with lower manifest arity than type arity is always called with more arguments, as in that case eta-expansion is allowed and often viable. The analysis is very much tailored towards the code generated when foldl is implemented via foldr; without this analysis doing so would be a very bad idea! There are other ways to improve foldr/builder-fusion to cope with foldl, if any of these are implemented then this step can probably be moved to -O2 to save some compilation times. The current impact of adding this phase is just below +2% (measured running GHC's "make").
* Refactor previous commit on fixing #7021.Richard Eisenberg2014-02-092-47/+19
|
* Apply changes relative to TH.Pred becoming a TH.Type's synonym (issue #7021)YoEight2014-02-093-49/+61
| | | | Signed-off-by: Richard Eisenberg <eir@cis.upenn.edu>
* Fix #8759 by not panicking with TH and patsyns.Richard Eisenberg2014-02-092-1/+4
| | | | We should still have pattern synonyms in TH, though.
* Fix #8758 by assuming RankNTypes when checking GND code.Richard Eisenberg2014-02-091-1/+2
|
* Issue an error for pattern synonyms defined in a local scope (#8757)Dr. ERDI Gergo2014-02-092-1/+13
| | | | | This also fixes the internal crash when using pattern synonyms in GHCi (#8749)
* Fix #8631.Richard Eisenberg2014-02-084-6/+23
| | | | | | | | This patch allows turning on ImpredicativeTypes while type-checking the code generated by GeneralizedNewtypeDeriving. It does this by adding a field ib_extensions to InstBindings, informing the type-checker what extensions should be enabled while type-checking the instance.
* In deepSplitCprType_maybe, be more forgivingJoachim Breitner2014-02-071-1/+3
| | | | | | the ConTag may be out of range (e.g. if the type constructor is imported via SOURCE and we don't know any of its data constructors); just return Nothing without complaining in that case. This fixes #8743.
* Eliminate duplicate code in Cmm pipelineJan Stolarek2014-02-031-51/+30
| | | | | | | | | End of Cmm pipeline used to be split into two alternative flows, depending on whether we did proc-point splitting or not. There was a lot of code duplication between these two branches. But it wasn't really necessary as the differences can be easily enclosed within an if-then-else. I observed no impact of this change on compilation performance.
* Document deprecations in HooplJan Stolarek2014-02-033-2/+30
|
* Remove unused importJan Stolarek2014-02-021-1/+0
|
* Remove redundant NoMonoLocalBinds pragmaJan Stolarek2014-02-021-5/+1
|
* Fix a popular typo in commentsGabor Greif2014-02-016-6/+6
|
* Nuke dead codeJan Stolarek2014-02-014-681/+5
| | | | | | | | | | | | | * CmmRewriteAddignments module was replaced by CmmSink a long time ago. That module is now available at https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/Hoopl/Examples wiki page. * removeDeadAssignments function was not used and it was also moved to the above page. * I also nuked some commented out debugging code that was not used for 1,5 year.
* Simplify Control Flow Optimisations Cmm passJan Stolarek2014-02-011-31/+12
| | | | | | | It turns out that one of the cases in the optimization pass was a special case of another. I remove that specialization since it does not have impact on compilation time, and the resulting Cmm is identical.
* Remove unnecessary LANGUAGE pragmaJan Stolarek2014-02-011-5/+0
|
* Loopification jump between stack and heap checksJan Stolarek2014-02-013-18/+53
| | | | | | | | | | | | Fixes #8585 When emmiting label of a self-recursive tail call (ie. when performing loopification optimization) we emit the loop header label after a stack check but before the heap check. The reason is that tail-recursive functions use constant amount of stack space so we don't need to repeat the check in every loop. But they can grow the heap so heap check must be repeated in every call. See Note [Self-recursive tail calls] and [Self-recursive loop header].
* Remove Coercible documentation from compiler/prelude/primops.txt.ppJoachim Breitner2014-01-301-41/+0
| | | | | We want it to show up in GHC.Exts, so we need to put the documentation in GHC.Types, where the datatype Coercible is defined.