| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
save + restore caller-saves registers around foreign calls
|
|
|
|
| |
Add callerSaveVolatileRegs for saving registers around C calls
|
|
|
|
| |
Add a ToDo
|
|
|
|
| |
Allow an empty list of volatile regs on a call
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Restore costant folding
|
|
|
|
| |
Back out earlier version of TH fix (dont merge this)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
optimise instance for lists: now we record the length first followed
by the elements.
HEADS UP: changes interface file representation, rebuild your libraries.
|
|
|
|
| |
Fix another minor bogon in the new rules stuff
|
|
|
|
|
| |
Fix a bad space leak in the native code generator: turn a couple of
lazy tuple matches into strict matches.
|
|
|
|
| |
Bogon in RULE desguaring
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
some small optimisations
|
|
|
|
|
| |
printing C: use the quick printForC rather than the slow (but
prettier) printForUser. This has been a ToDo for a while.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Comments
|
|
|
|
| |
Revert accidental commit
|
|
|
|
|
| |
Make various -fvia-C options conditional on GHC < 6.4, since the
native code generator is a bit more robust/complete these days.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Print occ info in Core
|
|
|
|
| |
Comments
|
|
|
|
| |
Wibble to dup-sig reporting
|
|
|
|
| |
Better error recovery for type signatures
|
|
|
|
| |
Wibbles to the big HsBinds reorg
|
|
|
|
| |
Comments
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Do refined dependency analysis in typechecking only with -fglasgow-exts
|
|
|
|
| |
Import trimming
|
|
|
|
| |
Wibble to SPECIALISE fix
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Sparc updates from Peter A Jonsson <pj at ludd.ltu.se>
|
|
|
|
| |
compMan is dead, Jim...
|
|
|
|
| |
remove RnSource.lhs-boot and add RnExpr.lhs-boot
|
|
|
|
| |
Wibble
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Fix TH_reifyType2 test
|
|
|
|
| |
Comments
|
|
|
|
|
|
|
|
| |
- -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.
|
|
|
|
|
|
|
|
|
| |
- -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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Give a more helpful error message on platforms for which FFI support
isn't implemented in GHCi (namely x86_64 at the moment).
|
|
|
|
|
|
|
|
|
|
|
| |
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.)
-
|
|
|
|
| |
Comment only
|
|
|
|
| |
handle PrimTyCons in pprTyConHdr (fixes :i GHC.Base.Int# in GHCi)
|