summaryrefslogtreecommitdiff
path: root/compiler
Commit message (Collapse)AuthorAgeFilesLines
* Support code generation for unboxed-tuple function argumentsunboxed-tuple-arguments2Max Bolingbroke2012-05-1546-434/+543
| | | | | | | | | | | 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
* Remove StgTypeArg since it was never used and is probably broken anywayMax Bolingbroke2012-05-154-16/+4
|
* Remove the unused Type field from StgLamMax Bolingbroke2012-05-153-7/+5
|
* Add a fixity environment to InteractiveContext (#2947)Paolo Capriotti2012-05-154-19/+39
|
* Simplify the behavior of package db flags.Paolo Capriotti2012-05-152-25/+25
| | | | | | | | | | | | | 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-conf flags to package-db.Paolo Capriotti2012-05-152-10/+10
| | | | | | | | 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.
* Add flags to manipulate package db stack (#5977)Paolo Capriotti2012-05-152-45/+60
| | | | | | | | 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.
* Tweak the lexer: In particular, improve notFollowedBy and friendsIan Lynagh2012-05-151-7/+14
| | | | | | | | | | | | | 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 "{-".
* Fix the the pure unifier so that it unifies kindsSimon Peyton Jones2012-05-142-32/+22
| | | | | | | | | | | 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!
* Merge branch 'master' of http://darcs.haskell.org/ghcSimon Peyton Jones2012-05-112-1/+4
|\
| * Handle cases with no alternatives in GHCiSimon Marlow2012-05-111-0/+3
| | | | | | | | Fixes cgrun045(ghci) amongst others
| * Fix bug in expandTypeSynonyms that could rarely cause problemsMax Bolingbroke2012-05-101-1/+1
| |
* | Delete dead code mkIParamTyConSimon Peyton Jones2012-05-111-6/+0
| |
* | Refactor LHsTyVarBndrs to fix Trac #6081Simon Peyton Jones2012-05-1119-366/+422
|/ | | | | | | | | | | | | | | 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.
* Comments onlySimon Peyton Jones2012-05-101-3/+27
|
* Merge branch 'master' of http://darcs.haskell.org//ghcSimon Peyton Jones2012-05-0953-1693/+1836
|\
| * Take care not to mix polymorphic and unlifted bindings in a groupSimon Peyton Jones2012-05-091-18/+41
| | | | | | | | Fixes Trac #6078
| * Wibbles to 'simplify the SimplCont data type'Simon Peyton Jones2012-05-092-3/+3
| |
| * Simplify the SimplCont data typeSimon Peyton Jones2012-05-092-103/+112
| | | | | | | | | | | | | | * Put the result type in the Stop continuation * No need for the alts type in Select The result is a modest but useful simplification
| * Merge branch 'ghc-new-flavor'Simon Peyton Jones2012-05-0916-883/+1005
| |\
| | * Make fresh variables when decomposing Givensghc-new-flavorSimon Peyton Jones2012-05-091-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * Use fresh uniques when unboxing coercions in the desugarerSimon Peyton Jones2012-05-091-26/+33
| | | | | | | | | | | | | | | This is kosher, and turns out to be vital when we have more complicate evidence terms.
| | * CosmeticsSimon Peyton Jones2012-05-092-4/+4
| | |
| | * Yet another major refactoring of the constraint solverSimon Peyton Jones2012-05-0716-857/+955
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Fix #6080 & house keeping in Vectorise.ExpManuel M T Chakravarty2012-05-082-465/+338
| | |
| * | Enable and fix building dynlibs on Win64Ian Lynagh2012-05-051-1/+1
| | |
| * | Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghcIan Lynagh2012-05-041-1/+1
| |\ \ | | |/
| | * Fix typo in error message (Trac #6076)Simon Peyton Jones2012-05-041-1/+1
| | |
| * | Follow libffi changes on WindowsIan Lynagh2012-05-041-1/+1
| |/
| * Fix overnight build breakage (fix from simonpj)Simon Marlow2012-05-041-3/+1
| | | | | | | | compiler/simplCore/SimplUtils.lhs:1668:5-25: Irrefutable pattern failed for pattern ((_, _, rhs1) : _)
| * Check the calling convention of foreign imported labels is supportedIan Lynagh2012-05-031-5/+7
| | | | | | | | Fixes 2276_ghci on Win64
| * Merge branch 'master' of http://darcs.haskell.org/ghcSimon Peyton Jones2012-05-022-18/+27
| |\
| | * Cast memory primops in the C backend (#5976)Paolo Capriotti2012-05-021-16/+25
| | | | | | | | | | | | | | | | | | | | | To prevent conflicts with GCC builtins, generate identical code for calls to mem primos and FFI calls. Based on a patch by Joachim Breitner.
| | * Fix Win64 build now that hsc2hs knows what platform we're onIan Lynagh2012-05-011-2/+2
| | |
| * | Allow cases with empty alterantivesSimon Peyton Jones2012-05-0218-106/+201
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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'
| * Wibble to pretty printingSimon Peyton Jones2012-05-011-3/+1
| |
| * Tidy up a remaining glitch in unificationSimon Peyton Jones2012-05-0113-150/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Egregious typo (fixes Trac #6055)Simon Peyton Jones2012-04-301-1/+1
| |
| * Merge branch 'master' of http://darcs.haskell.org//ghcSimon Peyton Jones2012-04-3044-614/+740
| |\
| * | More explicit pretty-printing of promoted TyCons with -dppr-debugSimon Peyton Jones2012-04-301-1/+2
| | |
| * | Make the interface-file deserialisation work right for promoted types (Trac ↵Simon Peyton Jones2012-04-301-7/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #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
* | | Re-do the "function application discount" (fixes Trac #6048)Simon Peyton Jones2012-05-091-87/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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%
* | | Be a little less aggressive about inlining (fixes Trac #5623)Simon Peyton Jones2012-05-094-39/+101
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Revert "Add -faggressive-primops"Simon Peyton Jones2012-04-275-73/+22
| | | | | | | | | | | | This reverts commit 745ec959ff647c3a455767d20f6f37e9a0cc65aa. Sigh. Seg fault
* | Revert "Refactoring in CoreUtils/CoreArity"Simon Peyton Jones2012-04-275-143/+115
| | | | | | | | | | | | This reverts commit e3f8557c2aca04cf64eec6a1aacde6e01c0944ff. Sigh. Seg fault.
* | Revert "Make more primops cheaper"Simon Peyton Jones2012-04-271-2/+0
| | | | | | | | | | | | This reverts commit a365a58eade7cb2c961af8e60c20b7d78b1b7484. Sigh. Seg fault. Major sigh.
* | Merge branch 'master' of http://darcs.haskell.org/ghcSimon Peyton Jones2012-04-279-35/+39
|\ \
| * \ Merge branch 'master' of darcs.haskell.org:/home/darcs/ghcSimon Peyton Jones2012-04-2729-324/+471
| |\ \
| * | | Pretty printing and debug improvementsSimon Peyton Jones2012-04-279-35/+39
| | | |
* | | | Make more primops cheaperSimon Peyton Jones2012-04-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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#