| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
As pointed out by Albert Y. C. Lai on glasgow-haskell-users.
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
by elaborating the domain a bit.
|
|
|
|
|
|
|
| |
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!
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
| |
There was a small mixup here, exposed by Trac #8762.
Now clarified with better function names and comments.
|
|
|
|
|
|
| |
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..
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Which on OS X leaves macro unexpanded.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
such as that of coerce.
|
|
|
|
| |
just like boxed type equalities.
|
|
|
|
|
| |
we want a rule "map coerce = coerce" to match the core generated for
"map Age" (this is #2110).
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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").
|
| |
|
|
|
|
| |
Signed-off-by: Richard Eisenberg <eir@cis.upenn.edu>
|
|
|
|
| |
We should still have pattern synonyms in TH, though.
|
| |
|
|
|
|
|
| |
This also fixes the internal crash when using pattern synonyms
in GHCi (#8749)
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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].
|
|
|
|
|
| |
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.
|