summaryrefslogtreecommitdiff
path: root/compiler
Commit message (Collapse)AuthorAgeFilesLines
* Comments and variable naming onlysimonpj@microsoft.com2009-10-291-3/+3
|
* Add static flag -funfolding-dict-discount (plus layout changes)simonpj@microsoft.com2009-10-291-9/+11
|
* Tidy up pretty-printing (use ppUnless)simonpj@microsoft.com2009-10-292-3/+3
|
* A small refactoring in the code for desugaring explicit listssimonpj@microsoft.com2009-10-291-13/+23
|
* White space layout onlysimonpj@microsoft.com2009-10-291-2/+2
|
* Make `consBag` infixr, and `snocBag` infixlsimonpj@microsoft.com2009-10-291-0/+3
|
* Add Outputable.blankLine and use itsimonpj@microsoft.com2009-10-2912-42/+45
|
* Comments onlysimonpj@microsoft.com2009-10-291-1/+1
|
* Add support for NoSpecConstr annotationRoman Leshchinskiy2009-10-292-27/+78
| | | | | | | | | Annotating a type with NoSpecConstr will prevent SpecConstr from specialising on arguments of that type. The syntax is import SpecConstr {-# ANN type T NoSpecConstr #-}
* Utility functions for annotationsRoman Leshchinskiy2009-10-292-3/+20
|
* Add new dynamic flag -fstrictness-beforeRoman Leshchinskiy2009-10-291-1/+12
| | | | | With -fstrictness-before=n, GHC runs an additional strictness analysis pass before simplifier phase n.
* Tidy VectInfo in tidyProgramRoman Leshchinskiy2009-10-172-7/+31
|
* Fix bug in data type vectorisationRoman Leshchinskiy2009-10-161-1/+1
|
* Drop unused importsimonpj@microsoft.com2009-10-281-1/+0
|
* Tidy up the parsing of comprehensions and improve locationssimonpj@microsoft.com2009-10-281-27/+20
| | | | While I was dealing with 'rec' statements I did this tidy-up
* Add 'rec' to stmts in a 'do', and deprecate 'mdo'simonpj@microsoft.com2009-10-2811-190/+339
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change is this (see Trac #2798). Instead of writing mdo { a <- getChar ; b <- f c ; c <- g b ; putChar c ; return b } you would write do { a <- getChar ; rec { b <- f c ; c <- g b } ; putChar c ; return b } That is, * 'mdo' is eliminated * 'rec' is added, which groups a bunch of statements into a single recursive statement This 'rec' thing is already present for the arrow notation, so it makes the two more uniform. Moreover, 'rec' lets you say more precisely where the recursion is (if you want to), whereas 'mdo' just says "there's recursion here somewhere". Lastly, all this works with rebindable syntax (which mdo does not). Currently 'mdo' is enabled by -XRecursiveDo. So we now deprecate this flag, with another flag -XDoRec to enable the 'rec' keyword. Implementation notes: * Some changes in Lexer.x * All uses of RecStmt now use record syntax I'm still not really happy with the "rec_ids" and "later_ids" in the RecStmt constructor, but I don't dare change it without consulting Ross about the consequences for arrow syntax.
* Remove a redundant parameter for mkTupleTy (the arity)simonpj@microsoft.com2009-10-283-7/+7
|
* Trivial improvement to mkForAllTysimonpj@microsoft.com2009-10-281-1/+1
|
* Add a coercion optimiser, to reduce the size of coercion termssimonpj@microsoft.com2009-10-262-1/+104
| | | | | | | | | | | | Coercion terms can get big (see Trac #2859 for example), so this patch puts the infrastructure in place to optimise them: * Adds Coercion.optCoercion :: Coercion -> Coercion * Calls optCoercion in Simplify.lhs The optimiser doesn't work right at the moment, so it is commented out, but Tom is going to work on it.
* Comments onlysimonpj@microsoft.com2009-10-231-1/+1
|
* Add restrictVarEnv :: VarEnv a -> VarSet -> VarEnv asimonpj@microsoft.com2009-10-231-1/+6
| | | | | I needed it, and then didn't need it, so it's not currently called, but its generally useful kind of thing.
* Use braces rather than angle-brackets in debug-printing for Bagssimonpj@microsoft.com2009-10-231-1/+1
|
* Fix Trac #3591: very tricky specialiser bugsimonpj@microsoft.com2009-10-232-181/+314
| | | | | | | | | | There was a subtle bug in the interation of specialisation and floating, described in Note [Specialisation of dictionary functions]. The net effect was to create a loop where none existed before; plain wrong. In fixing it, I did quite a bit of house-cleaning in the specialiser, and added a lot more comments. It's tricky, alas.
* Fix Trac #3590: a nasty type-checker bug in left/right sectionssimonpj@microsoft.com2009-10-201-21/+26
| | | | | | | | | | The bug related to the fact that boxyUnify (now) returns a coercion, which was simply being ignored. (TcExpr is clearly not warning-free wrt the unused-monadic-bind thing!) Anyway, it's fine now. I added a test case to the test suite. MERGE to 6.12 please.
* Allow -ticky and -prof togethersimonpj@microsoft.com2009-10-201-0/+5
| | | | | | | | | | The two used to be incompatible, but they aren't any longer. In fact, -ticky should not be a 'way' any more, and doing that is on Simon M's todo list, but this patch takes us a little step closer. I'm not sure this is worth merging to the 6.12 branch.
* Make a mingw tree from mingw tarballsIan Lynagh2009-10-231-1/+1
|
* Tidy up TcSplice, especially runMeta and friendssimonpj@microsoft.com2009-10-202-67/+70
| | | | | | | I wanted to see the TH syntax produced by a splice, before its conversion back into HsSyn. Doing so involved some refactoring. This only affects deubbging code (-ddump-tc-trace).
* Add flags -fno-specialise, -fno-float-in, and document themsimonpj@microsoft.com2009-10-201-3/+11
| | | | | | It turned out that we lacked flags to switch off these two passes, so I added them.
* Fix Trac #3600: Template Haskell bug in Convertsimonpj@microsoft.com2009-10-201-4/+10
| | | | | | | | | This bug was introduced when I added an optimisation, described in Note [Converting strings] in Convert.lhs. It was treating *all* empty lists as strings, not just string-typed ones! The fix is easy. Pls MERGE to stable branch.
* Add some manual dependencies, and -fforce-recomp for Constants and PrimOpsSimon Marlow2009-10-151-1/+6
| | | | | | GHC's recompilation checker doesn't take into account #included files, which is really a bug. We work around it here by adding dependencies and using -fforce-recomp in a couple of places.
* Fix Trac #959: a long-standing bug in instantiating otherwise-unbound type ↵simonpj@microsoft.com2009-10-1518-227/+272
| | | | | | | | | | | | | | | | | | | | | | | variables DO NOT MERGE TO GHC 6.12 branch (Reason: interface file format change.) The typechecker needs to instantiate otherwise-unconstraint type variables to an appropriately-kinded constant type, but we didn't have a supply of arbitrarily-kinded tycons for this purpose. Now we do. The details are described in Note [Any types] in TysPrim. The fundamental change is that there is a new sort of TyCon, namely AnyTyCon, defined in TyCon. Ter's a small change to interface-file binary format, because the new AnyTyCons have to be serialised. I tided up the handling of uniques a bit too, so that mkUnique is not exported, so that we can see all the different name spaces in one module.
* Fix several missing dependencies in ifFreeNamessimonpj@microsoft.com2009-10-151-10/+54
| | | | | | | | | | | | | | These missing dependencies led to: ghc-stage1: panic! (the 'impossible' happened) (GHC version 6.13 for x86_64-unknown-linux): urk! lookup local fingerprint ghc-6.13:CgBindery.CgBindings{tc r4Z} Simon and I don't quite understand why I've encountered these while no one else has, but they are certainly bugs, and this patch certainly fixes them. Merge to 6.12 branch
* Correct commentsimonpj@microsoft.com2009-10-153-3/+12
|
* Fix Trac #3263: don't print Hpc tick stuff unless -dppr-debug is onsimonpj@microsoft.com2009-10-152-21/+34
| | | | | | | | In general, when pretty-printing HsSyn, we omit the extra info added by GHC (type appplications and abstractions, etc) when printing stuff for the user. But we weren't applying that guideline to the HsTick stuff for Hpc. This patch adds the necessary tests.
* Fix warningsRoman Leshchinskiy2009-10-154-22/+16
|
* Don't hardwire PA and PR dfuns in the vectoriserRoman Leshchinskiy2009-10-153-63/+38
| | | | | Instead, we simply find all available PA and PR instances and get our dfuns from those.
* PA and PR from dph are now type classesRoman Leshchinskiy2009-10-153-251/+432
| | | | | This is a fairly big change to the vectoriser in preparation to Simon's inline patch.
* Fix FFI declaration checksSimon Marlow2009-10-141-1/+2
| | | | | For GHCi, foreign labels should be allowed, but foreign export should be disallowed; both were previously wrong.
* Fixes for cross-compiling to a different word sizeSimon Marlow2009-10-142-29/+6
| | | | | | | | | | | | | | This patch eliminates a couple of places where we were assuming that the host word size is the same as the target word size. Also a little refactoring: Constants now exports the types TargetInt and TargetWord corresponding to the Int/Word type on the target platform, and I moved the definitions of tARGET_INT_MAX and friends from Literal to Constants. Thanks to Barney Stratford <barney_stratford@fastmail.fm> for helping track down the problem and fix it. We now know that GHC can successfully cross-compile from 32-bit to 64-bit.
* Fix #3579: avoid clashing with names of implicit bindingsSimon Marlow2009-10-141-4/+9
|
* New flag -dsuppress-coercions to avoid printing coercions in Core dumpsRoman Leshchinskiy2009-10-143-2/+9
|
* Make tyConSingleDataCon_maybe more forgivingsimonpj@microsoft.com2009-10-081-7/+4
| | | | | | | | This function was barfing on a type family tycon; which in turn crashed the compiler (when -ticky is in use) because of the use in CmmTicky.hs. There's no need for it to reject such tycons, so I just made it return Nothing rather than falling over.
* Add flag -XExplicitForAll and document itsimonpj@microsoft.com2009-10-073-22/+26
| | | | | | | | | | | | | This implements the Haskell Prime proposal http://hackage.haskell.org/trac/haskell-prime/wiki/ExplicitForall Flag is -XExplicitForAll Implied by Opt_RankNTypes, Opt_Rank2Types, Opt_ScopedTypeVariables, Opt_LiberalTypeSynonyms, Opt_ExistentialQuantification, Opt_PolymorphicComponents
* Packages are only shadowed if the InstalledPackageId is *different*Simon Marlow2009-10-061-6/+7
| | | | | If the two InstalledPackageIds are the same, then the packages are interchangeable and we don't need to explicitly remove one of them.
* Use the standard library versions of elem and notElemIan Lynagh2009-10-051-21/+12
| | | | rather than our own copies
* Fix typo in commentIan Lynagh2009-10-021-1/+1
|
* Use "order only constraints" for directoriesIan Lynagh2009-10-021-4/+2
| | | | There are now 104 calls to mkdirhier, down from 1201, when validating.
* Replace a checking `is_elem` with a plain `elem`Simon Marlow2009-09-301-2/+1
| | | | This one complains sometimes, but there's no good way to improve it.
* Fix pretty-printing precedence for equality constraintssimonpj@microsoft.com2009-10-021-1/+7
|
* Comments onlysimonpj@microsoft.com2009-10-021-3/+7
|