summaryrefslogtreecommitdiff
path: root/ghc/compiler
Commit message (Collapse)AuthorAgeFilesLines
...
* [project @ 2005-08-02 14:04:19 by simonmar]simonmar2005-08-021-1/+7
| | | | save + restore caller-saves registers around foreign calls
* [project @ 2005-08-02 14:03:40 by simonmar]simonmar2005-08-021-1/+34
| | | | Add callerSaveVolatileRegs for saving registers around C calls
* [project @ 2005-08-02 12:02:16 by simonmar]simonmar2005-08-021-0/+1
| | | | Add a ToDo
* [project @ 2005-08-02 12:01:57 by simonmar]simonmar2005-08-021-0/+1
| | | | Allow an empty list of volatile regs on a call
* [project @ 2005-07-28 14:58:27 by simonpj]simonpj2005-07-282-27/+45
| | | | | | | Make ghc -M work when you give multiple files with the same module name. We want to do this to the STABLE branch too, but this commit will not merge; it'll need to be done afresh.
* [project @ 2005-07-28 14:45:55 by simonpj]simonpj2005-07-281-6/+8
| | | | Restore costant folding
* [project @ 2005-07-28 13:51:54 by simonpj]simonpj2005-07-281-8/+1
| | | | Back out earlier version of TH fix (dont merge this)
* [project @ 2005-07-28 13:51:28 by simonpj]simonpj2005-07-281-8/+15
| | | | | | | | | | | | | | | | MERGE to STABLE Fix a TH name-reification bug. The problem is that when you say 'name in TH, you'd better load the home interface for "name", so that deprecations are reported properly. Fixes SourceForge [ghc-Bugs-1246483 ] Template Haskell panic with class names TH_reifyType2 is a test for it.
* [project @ 2005-07-28 12:57:13 by simonmar]simonmar2005-07-281-8/+14
| | | | | | | optimise instance for lists: now we record the length first followed by the elements. HEADS UP: changes interface file representation, rebuild your libraries.
* [project @ 2005-07-28 12:48:25 by simonpj]simonpj2005-07-281-3/+5
| | | | Fix another minor bogon in the new rules stuff
* [project @ 2005-07-28 11:19:03 by simonmar]simonmar2005-07-281-3/+6
| | | | | Fix a bad space leak in the native code generator: turn a couple of lazy tuple matches into strict matches.
* [project @ 2005-07-27 11:55:43 by simonpj]simonpj2005-07-271-2/+4
| | | | Bogon in RULE desguaring
* [project @ 2005-07-27 08:04:02 by simonpj]simonpj2005-07-271-10/+24
| | | | | | | | | | | | | | Try MERGE to STABLE GHC does not do type subsumption in patterns. But it should be fine if the expected type and the pattern have the same type, even if they are polymorphic. But that test (in TcUnify.tcSubPat) wasn't implemented right, which gave rise to perplexing messages like: Couldn't match `forall a. a -> b' against `forall a. a -> b' This fixes the bug. tc198 tests it, while tcfail145 tests the non-matching case.
* [project @ 2005-07-26 13:13:20 by simonmar]simonmar2005-07-262-23/+29
| | | | some small optimisations
* [project @ 2005-07-26 12:15:54 by simonmar]simonmar2005-07-261-2/+1
| | | | | printing C: use the quick printForC rather than the slow (but prettier) printForUser. This has been a ToDo for a while.
* [project @ 2005-07-26 12:14:03 by simonmar]simonmar2005-07-263-27/+190
| | | | | | | | | | Add a layer of write buffering over Handle when dumping the output: this saves a lot of time because we're doing a lot of small writes, and Handle operations have a non-trivial constant overhead due to the thread-safety, exception-safety etc. This improvement results in about a 10% reduction in compile time for non-optimised, somewhat less for optimised compilation.
* [project @ 2005-07-26 08:31:21 by simonpj]simonpj2005-07-261-1/+4
| | | | | | | When trimming type constructors for export, no need to trim enumerations, because they don't give rise to any further exported things. (Minor improvement: no need to merge)
* [project @ 2005-07-26 08:29:44 by simonpj]simonpj2005-07-261-24/+16
| | | | | | | | | | MERGE TO STABLE Fix a TH bug. When a type constructor was exported abstractly (which happens when you don't have -O), and then reified in an importing module, the reification crashed. Now it just gives a TyCon with no constructors.
* [project @ 2005-07-26 08:16:24 by simonpj]simonpj2005-07-261-0/+1
| | | | Comments
* [project @ 2005-07-26 07:30:37 by simonpj]simonpj2005-07-261-4/+4
| | | | Revert accidental commit
* [project @ 2005-07-25 15:48:18 by simonmar]simonmar2005-07-251-7/+10
| | | | | Make various -fvia-C options conditional on GHC < 6.4, since the native code generator is a bit more robust/complete these days.
* [project @ 2005-07-25 14:12:48 by simonmar]simonmar2005-07-256-165/+13
| | | | | | Remove the ForeignObj# type, and all its PrimOps. The new efficient representation of ForeignPtr doesn't use ForeignObj# underneath, and there seems no need to keep it.
* [project @ 2005-07-25 11:43:09 by simonpj]simonpj2005-07-251-1/+1
| | | | Print occ info in Core
* [project @ 2005-07-25 11:42:24 by simonpj]simonpj2005-07-252-9/+9
| | | | Comments
* [project @ 2005-07-25 11:29:36 by simonpj]simonpj2005-07-251-3/+5
| | | | Wibble to dup-sig reporting
* [project @ 2005-07-25 11:24:24 by simonpj]simonpj2005-07-251-7/+9
| | | | Better error recovery for type signatures
* [project @ 2005-07-25 11:10:33 by simonpj]simonpj2005-07-253-37/+33
| | | | Wibbles to the big HsBinds reorg
* [project @ 2005-07-25 11:10:01 by simonpj]simonpj2005-07-251-1/+1
| | | | Comments
* [project @ 2005-07-25 11:08:26 by simonpj]simonpj2005-07-252-8/+23
| | | | | | | | | MERGE TO STABLE if poss Make the "root main" Id :Main.main into an *implicit* Id, whose parent is Main.main. What that means is that the "root main" Id won't be emitted into the interface file. Which has not been causing a problem in practice but is clearly wrong -- there were two 'main's in the interface file.
* [project @ 2005-07-22 14:00:34 by simonpj]simonpj2005-07-224-30/+30
| | | | | | | | | | | | | | | | | MERGE TO STABLE Fix a long-standing bug in dependency tracking. If you have import M( x ) then you must recompile if M's export list changes, because it might no longer export x. Until now we have only done that if the import was import M I can't think why this bug has lasted so long. Thanks to Ian Lynagh for pointing it out.
* [project @ 2005-07-22 13:58:46 by simonpj]simonpj2005-07-221-9/+17
| | | | Do refined dependency analysis in typechecking only with -fglasgow-exts
* [project @ 2005-07-22 13:58:17 by simonpj]simonpj2005-07-223-5/+3
| | | | Import trimming
* [project @ 2005-07-22 08:44:43 by simonpj]simonpj2005-07-221-1/+6
| | | | Wibble to SPECIALISE fix
* [project @ 2005-07-21 11:05:26 by simonpj]simonpj2005-07-212-3/+5
| | | | | | | | | | Arrange that a 'deriving' clause works for a GADT-syntax data type delaration, provided it declares a Haskell-98-style data type (i.e. no existentials or GADT stuff). This just allows you to use a different syntax for data type declarations without losing 'deriving'. A couple of people requested this, and it's really easy to do.
* [project @ 2005-07-21 10:46:12 by simonmar]simonmar2005-07-215-712/+529
| | | | Sparc updates from Peter A Jonsson <pj at ludd.ltu.se>
* [project @ 2005-07-21 08:41:23 by panne]panne2005-07-212-3/+1
| | | | compMan is dead, Jim...
* [project @ 2005-07-19 22:55:10 by simonpj]simonpj2005-07-192-20/+17
| | | | remove RnSource.lhs-boot and add RnExpr.lhs-boot
* [project @ 2005-07-19 22:53:37 by simonpj]simonpj2005-07-191-2/+7
| | | | Wibble
* [project @ 2005-07-19 16:44:50 by simonpj]simonpj2005-07-1971-1905/+2044
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WARNING: this is a big commit. You might want to wait a few days before updating, in case I've broken something. However, if any of the changes are what you wanted, please check it out and test! This commit does three main things: 1. A re-organisation of the way that GHC handles bindings in HsSyn. This has been a bit of a mess for quite a while. The key new types are -- Bindings for a let or where clause data HsLocalBinds id = HsValBinds (HsValBinds id) | HsIPBinds (HsIPBinds id) | EmptyLocalBinds -- Value bindings (not implicit parameters) data HsValBinds id = ValBindsIn -- Before typechecking (LHsBinds id) [LSig id] -- Not dependency analysed -- Recursive by default | ValBindsOut -- After typechecking [(RecFlag, LHsBinds id)]-- Dependency analysed 2. Implement Mark Jones's idea of increasing polymoprhism by using type signatures to cut the strongly-connected components of a recursive group. As a consequence, GHC no longer insists on the contexts of the type signatures of a recursive group being identical. This drove a significant change: the renamer no longer does dependency analysis. Instead, it attaches a free-variable set to each binding, so that the type checker can do the dep anal. Reason: the typechecker needs to do *two* analyses: one to find the true mutually-recursive groups (which we need so we can build the right CoreSyn) one to find the groups in which to typecheck, taking account of type signatures 3. Implement non-ground SPECIALISE pragmas, as promised, and as requested by Remi and Ross. Certainly, this should fix the current problem with GHC, namely that if you have g :: Eq a => a -> b -> b then you can now specialise thus SPECIALISE g :: Int -> b -> b (This didn't use to work.) However, it goes further than that. For example: f :: (Eq a, Ix b) => a -> b -> b then you can make a partial specialisation SPECIALISE f :: (Eq a) => a -> Int -> Int In principle, you can specialise f to *any* type that is "less polymorphic" (in the sense of subsumption) than f's actual type. Such as SPECIALISE f :: Eq a => [a] -> Int -> Int But I haven't tested that. I implemented this by doing the specialisation in the typechecker and desugarer, rather than leaving around the strange SpecPragmaIds, for the specialiser to find. Indeed, SpecPragmaIds have vanished altogether (hooray). Pragmas in general are handled more tidily. There's a new data type HsBinds.Prag, which lives in an AbsBinds, and carries pragma info from the typechecker to the desugarer. Smaller things - The loop in the renamer goes via RnExpr, instead of RnSource. (That makes it more like the type checker.) - I fixed the thing that was causing 'check_tc' warnings to be emitted.
* [project @ 2005-07-18 11:47:08 by simonpj]simonpj2005-07-181-2/+8
| | | | Fix TH_reifyType2 test
* [project @ 2005-07-18 11:46:32 by simonpj]simonpj2005-07-181-0/+2
| | | | Comments
* [project @ 2005-07-14 15:14:33 by simonmar]simonmar2005-07-141-15/+16
| | | | | | | | - -package P picks the latest version of P, instead of complaining if P is ambiguous. - -hide-package P hides all versions of P, instead of complaining if P is ambiguous.
* [project @ 2005-07-14 15:12:20 by simonmar]simonmar2005-07-141-5/+30
| | | | | | | | | - -package P hides all other versions of P (this was advertised in the documentation, but wasn't actually implemented in 6.4) - if multiple packages with the same name are still exposed after the flags have been processed, then all except the latest version are hidden.
* [project @ 2005-07-13 10:16:11 by simonpj]simonpj2005-07-131-1/+9
| | | | | | | | | | | | MERGE to STABLE Switch the order of equations generated by FunDeps.improve, so that the error messages are more perspicuous. This fixes SourceForge [ ghc-Bugs-1234239 ] "Bad location for violation of functional dependency" tcfail143 tests.
* [project @ 2005-07-12 16:30:01 by simonpj]simonpj2005-07-122-189/+188
| | | | | | | | | | | Try MERGE to STABLE When TH splices in code, it was previously decorated with noLoc. If there were any type errors in it, we got a very unhelpful message. Now we propagate the splice location everywhere into the spliced code. The location isn't very exact, because it refers to the splice site, but it's better than before.
* [project @ 2005-07-12 14:50:10 by simonpj]simonpj2005-07-121-15/+22
| | | | | | | | | | | | | | An earlier commit, liberalising the defaulting rules for ghci, messed up the handling of defaulting at the top level. This commit fixes it. The current story is that if there's an ambiguous top-level multi-parameter constraint (C a b), then a,b won't be defaulted, regardless of how a,b are used otherwise. A type variable is defaulted only if it's constrained by single-parameter type classes, even in the more-liberal GHCi. tcfail142 tests this case.
* [project @ 2005-07-12 14:41:00 by simonmar]simonmar2005-07-121-1/+3
| | | | | Give a more helpful error message on platforms for which FFI support isn't implemented in GHCi (namely x86_64 at the moment).
* [project @ 2005-07-12 13:38:08 by simonpj]simonpj2005-07-121-6/+19
| | | | | | | | | | | Check for an unboxed tuple binding f = (# True, False #) A fairly recent change, that treats specially non-recursive bindings of a single variable, failed to take this into account. tcfail141 tests this case. (Was simpl008.) -
* [project @ 2005-07-12 13:36:49 by simonpj]simonpj2005-07-121-0/+2
| | | | Comment only
* [project @ 2005-07-12 13:01:44 by simonmar]simonmar2005-07-121-2/+3
| | | | handle PrimTyCons in pprTyConHdr (fixes :i GHC.Base.Int# in GHCi)