| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
This is done by a 'unarisation' pre-pass at the STG level which
translates away all (live) binders binding something of unboxed
tuple type.
This has the following knock-on effects:
* The subkind hierarchy is vastly simplified (no UbxTupleKind or ArgKind)
* Various relaxed type checks in typechecker, 'foreign import prim' etc
* All case binders may be live at the Core level
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the `-no-user-package` and `-no-global-package` flags
affected the "initial" stack only, while `user-package` and
`global-packages` appended to the end of the stack.
This commit changes the behavior of those flags, so that they are always
applied to the stack as a whole.
The effect of the GHC_PACKAGE_PATH environment variable has also been
changed: terminating it with a separator now adds the default package
dbs (user and global) instead of the initial stack.
|
|
|
|
|
|
|
|
| |
Rename package database flags in both GHC and ghc-pkg so that they are
consistent with Cabal nomenclature.
Add a version check to the build system so that the correct set of
package db flags are used when the bootstrapping GHC has version < 7.5.
|
|
|
|
|
|
|
|
| |
Introduce new flags to allow any package database stack to be set up.
The `-no-user-package-conf` and `-no-global-package-conf` flags remove
the corresponding package db from the initial stack, while
`-user-package-conf` and `-global-package-conf` push it back on top of
the stack.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were hitting a problem when reading the LANGUAGE/OPTIONS pragmas
from GHC.TypeLits, where the buffer ended "{-". The rules for the
start-comment lexeme check that "{-" is not followed by "#", but the
test returned False when there was no next character. Therefore we
were lexing this as as an open-curly lexeme (only consuming the "{",
and not reaching the end of the buffer),
which meant the options parser think that it had reached the end of
the options.
Now we correctly lex as "{-".
|
|
|
|
|
|
|
|
|
|
|
| |
When unifying two type variables we must unify their kinds.
The pure *matcher* was doing so, but the pure *unifier* was not.
This patch fixes Trac #6015, where an instance lookup was failing
when it should have succeeded.
I removed a bunch of code aimed at support sub-kinding. It's
tricky, ad-hoc, and I don't think its necessary any more.
Anything we can do to simplify the sub-kinding story is welcome!
|
|\ |
|
| |
| |
| |
| | |
Fixes cgrun045(ghci) amongst others
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is really a small change, but it touches a lot of files quite
significantly. The real goal is to put the implicitly-bound kind
variables of a data/class decl in the right place, namely on the
LHsTyVarBndrs type, which now looks like
data LHsTyVarBndrs name
= HsQTvs { hsq_kvs :: [Name]
, hsq_tvs :: [LHsTyVarBndr name]
}
This little change made the type checker neater in a number of
ways, but it was fiddly to push through the changes.
|
| |
|
|\ |
|
| |
| |
| |
| | |
Fixes Trac #6078
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
* Put the result type in the Stop continuation
* No need for the alts type in Select
The result is a modest but useful simplification
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This turns out to be important becuase we don't have
a form for superclass selection in TcCoercion (we could
but we don't).
Se comments with xCtFlavor_cache, the Given case.
|
| | |
| | |
| | |
| | |
| | | |
This is kosher, and turns out to be vital when we have
more complicate evidence terms.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is the result of Simon and Dimitrios doing a code walk through.
There is no change in behaviour, but the structure is much better.
Main changes:
* Given constraints contain an EvTerm not an EvVar
* Correspondingly, TcEvidence is a recursive types that uses
EvTerms rather than EvVars
* Rename CtFlavor to CtEvidence
* Every CtEvidence has a ctev_pred field. And use record fields
consistently for CtEvidence
* The solved-constraint fields of InertSet (namely inert_solved and
inert_solved_funeqs) contain CtEvidence, not Ct
There is a long cascade of follow-on changes.
|
| | | |
|
| | | |
|
| |\ \
| | |/ |
|
| | | |
|
| |/ |
|
| |
| |
| |
| | |
compiler/simplCore/SimplUtils.lhs:1668:5-25: Irrefutable pattern failed for pattern ((_, _, rhs1) : _)
|
| |
| |
| |
| | |
Fixes 2276_ghci on Win64
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
To prevent conflicts with GCC builtins, generate identical code for
calls to mem primos and FFI calls.
Based on a patch by Joachim Breitner.
|
| | | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch allows, for the first time, case expressions with an empty
list of alternatives. Max suggested the idea, and Trac #6067 showed
that it is really quite important.
So I've implemented the idea, fixing #6067. Main changes
* See Note [Empty case alternatives] in CoreSyn
* Various foldr1's become foldrs
* IfaceCase does not record the type of the alternatives.
I added IfaceECase for empty-alternative cases.
* Core Lint does not complain about empty cases
* MkCore.castBottomExpr constructs an empty-alternative case
expression (case e of ty {})
* CoreToStg converts '(case e of {})' to just 'e'
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There was one place, in type checking parallel list comprehensions
where we were unifying types, but had no convenient way to use the
resulting coercion; instead we just checked that it was Refl. This
was Wrong Wrong; it might fail unpredicably in a GADT-like situation,
and it led to extra error-generation code used only in this one place.
This patch tidies it all up, by moving the 'return' method from the
*comprehension* to the ParStmtBlock. The latter is a new data type,
now used for each sub-chunk of a parallel list comprehension.
Because of the data type change, quite a few modules are touched,
but only in a fairly trivial way. The real changes are in TcMatches
(and corresponding desugaring); plus deleting code from TcUnify.
This patch also fixes the pretty-printing bug in Trac #6060
|
| | |
|
| |\ |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
#6054)
GHC currently uses the slightly-dodgy plan that when we proote
a TyCon to be a Kind constructor we leave it with the same Name.
That means that to make sense of a IfaceType we need to know wheter
it is really an IfaceType or an IfaceKind, because in the latter an
occurrence of (say) Maybe will be the *promoted* Maybe.
See Note [Checking IfaceTypes vs IfaceKinds] in TcIface
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Undoes Max's very aggressive function-inlining change
(see comments with Trac #6048)
* Resticts function application discount to functions
that occur just once in the body. It was the multiple
occurrences that led to the exponential behavour in
Trac #6048.
See Note [Function application discount] in CoreUnfold.
Module binary sizes are down 2% on average, which is good.
Allocations wobble about a bit, but only on a few benchmarks
and not by much, so it seems a price worth paying to avoid
exponential behaviour!
Allocs
Min -1.2%
Max +2.8%
Geometric Mean +0.0%
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When inlining, we are making a copy of the expression, so we have to
be careful about duplicating work. Previously we were using
exprIsCheap for that, but it is willing to duplicate a cheap primop --
and that is terribly bad if it happens inside some inner array loop
(Trac #5623). So now we use a new function exprIsWorkFree. Even
then there is some wiggle room:
see Note [exprIsWorkFree] in CoreUtils
This commit does make wheel-sieve1 allocate a lot more, but we decided
that's just tough; it's more important for inlining to be robust
about not duplicating work.
|
| |
| |
| |
| |
| |
| | |
This reverts commit 745ec959ff647c3a455767d20f6f37e9a0cc65aa.
Sigh. Seg fault
|
| |
| |
| |
| |
| |
| | |
This reverts commit e3f8557c2aca04cf64eec6a1aacde6e01c0944ff.
Sigh. Seg fault.
|
| |
| |
| |
| |
| |
| | |
This reverts commit a365a58eade7cb2c961af8e60c20b7d78b1b7484.
Sigh. Seg fault. Major sigh.
|
|\ \ |
|
| |\ \ |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This puts back the earlier behaviour (pre "aggressive-primop" patch)
whereby most primpos were considered cheap. In the aggressive-primop
patch we made them ones with bigger "code_size" seem not-cheap, but
this slows down fft2 a lot. So I've reverted to the earlier behaviour.
+++ b/compiler/prelude/PrimOp.lhs
@@ -450,6 +450,8 @@ primOpIsCheap op
-- This is vital; see Note [PrimOp can_fail and has_side_effects]
&& not (primOpOutOfLine op)
- -- && primOpCodeSize op <= primOpCodeSizeDefault
+-- Omitting; it makes fft2 run a lot slower by preventing
+-- eta expansion in an inner loop, with a primop cosDouble#
|