Simon Marlow [Tue, 23 Oct 2007 08:22:33 +0000 (08:22 +0000)]
FIX BUILD (on 32-bit platforms): hs_hpc_module() type mismatch
Simon Marlow [Mon, 22 Oct 2007 13:33:37 +0000 (13:33 +0000)]
patch from #1782; fixes check-packages target on Solaris
Simon Marlow [Thu, 18 Oct 2007 12:52:20 +0000 (12:52 +0000)]
add PIC relocations for x86_64, and use a simpler hack in place of x86_64_high_symbol()
This is Wolfgang Thaller's patch sent to cvs-ghc recently, with extra
commentary by me. It turns out that this patch is not just a cleanup,
it is also necessary for GHCi to work on x86_64 with shared libraries,
because previously lookupSymbol() was creating jump-table entries for
all symbols looked up that resolved outside 2Gb, whereas Wolfgang's
version only generates jump-table entries for 32-bit symbol references
in object code that we load.
Simon Marlow [Wed, 17 Oct 2007 15:28:20 +0000 (15:28 +0000)]
fix creation of ghc-inplace for non-std ways
Simon Marlow [Tue, 16 Oct 2007 15:18:29 +0000 (15:18 +0000)]
remove an incorrect assertion
Simon Marlow [Fri, 19 Oct 2007 13:32:43 +0000 (13:32 +0000)]
second attempt to fix C compiler warnings with -fhpc
The hs_hpc_module() prototype in RtsExternal.h didn't match its usage:
we were passing StgWord-sized parameters but the prototype used C
ints. I think it accidentally worked because we only ever passed
constants that got promoted. The constants unfortunately were
sometimes negative, which caused the C compiler to emit warnings.
I suspect PprC.pprHexVal may be wrong to emit negative constants in
the generated C, but I'm not completely sure. Anyway, it's easy to
fix this in CgHpc, which is what I've done.
Manuel M T Chakravarty [Fri, 19 Oct 2007 11:56:53 +0000 (11:56 +0000)]
Zonk quantified tyvars with skolems
We used to zonk quantified type variables to regular TyVars. However, this
leads to problems. Consider this program from the regression test suite:
eval :: Int -> String -> String -> String
eval 0 root actual = evalRHS 0 root actual
evalRHS :: Int -> a
evalRHS 0 root actual = eval 0 root actual
It leads to the deferral of an equality
(String -> String -> String) ~ a
which is propagated up to the toplevel (see TcSimplify.tcSimplifyInferCheck).
In the meantime `a' is zonked and quantified to form `evalRHS's signature.
This has the *side effect* of also zonking the `a' in the deferred equality
(which at this point is being handed around wrapped in an implication
constraint).
Finally, the equality (with the zonked `a') will be handed back to the
simplifier by TcRnDriver.tcRnSrcDecls calling TcSimplify.tcSimplifyTop.
If we zonk `a' with a regular type variable, we will have this regular type
variable now floating around in the simplifier, which in many places assumes to
only see proper TcTyVars.
We can avoid this problem by zonking with a skolem. The skolem is rigid
(which we requirefor a quantified variable), but is still a TcTyVar that the
simplifier knows how to deal with.
Manuel M T Chakravarty [Thu, 18 Oct 2007 13:10:40 +0000 (13:10 +0000)]
Fix typo that prevented zonking of rhs of EqInsts
MERGE TO STABLE
Simon Marlow [Fri, 19 Oct 2007 11:57:51 +0000 (11:57 +0000)]
implement #1468, :browse on its own uses the currently-loaded module
Simon Marlow [Fri, 19 Oct 2007 11:02:23 +0000 (11:02 +0000)]
FIX #1784: EM_AMD64 and EM_X86_64 might both be defined to the same value
Duncan Coutts [Thu, 18 Oct 2007 22:21:28 +0000 (22:21 +0000)]
Tell Cabal what it's version number is while bootstrapping it
This means that it'll work with all the packages that specify a cabal-version
Simon Marlow [Thu, 18 Oct 2007 13:49:51 +0000 (13:49 +0000)]
FIX #1450: asynchronous exceptions are now printed by +RTS -xc
Simon Marlow [Thu, 18 Oct 2007 11:06:21 +0000 (11:06 +0000)]
fix -fbreak-on-exception for unregsterised
Simon Marlow [Thu, 18 Oct 2007 10:53:40 +0000 (10:53 +0000)]
fix :print when !tablesNextToCode
Simon Marlow [Thu, 18 Oct 2007 10:19:29 +0000 (10:19 +0000)]
fix breakpoints in unregisterised mode
Simon Marlow [Thu, 18 Oct 2007 09:55:03 +0000 (09:55 +0000)]
Change some ints to unsigned ints
Fixes some gratuitous warnings when compiling via C with -fhpc
Simon Marlow [Thu, 18 Oct 2007 09:54:17 +0000 (09:54 +0000)]
fix warnings when compiling via C
Simon Marlow [Thu, 18 Oct 2007 09:44:15 +0000 (09:44 +0000)]
rollback "accounting wibble: we were missing an alloc_blocks .. "
I misread the code, now added a comment to explain why it isn't necessary
Simon Marlow [Wed, 17 Oct 2007 12:56:57 +0000 (12:56 +0000)]
recordMutable: test for gen>0 before calling recordMutableCap
For some reason the C-- version of recordMutable wasn't verifying that
the object was in an old generation before attempting to add it to the
mutable list, and this broke maessen_hashtab. This version of
recordMutable is only used in unsafeThaw#.
Simon Marlow [Wed, 17 Oct 2007 14:40:07 +0000 (14:40 +0000)]
re-instate missing parts of "put the @N suffix on stdcall foreign calls in .cmm code"
These changes were apparently lost during "massive changes to add a
'zipper' representation of C-"
Manuel M T Chakravarty [Thu, 18 Oct 2007 06:03:36 +0000 (06:03 +0000)]
Don't barf on error message with non-tc tyvars
MERGE TO STABLE
Manuel M T Chakravarty [Thu, 18 Oct 2007 04:43:52 +0000 (04:43 +0000)]
Fix deferring on tyvars in TcUnify.subFunTys
Manuel M T Chakravarty [Wed, 17 Oct 2007 11:43:26 +0000 (11:43 +0000)]
TcUnify.subFunTys must take type families into account
* A bug reported by Andrew Appleyard revealed that subFunTys did take
neither type families nor equalities into account. In a fairly obscure
case there was also a coercion ignored.
Simon Marlow [Wed, 17 Oct 2007 13:41:45 +0000 (13:41 +0000)]
Refactoring: extract platform-specific code from sm/MBlock.c
Also common-up some duplicate bits in the platform-specific code
Simon Marlow [Wed, 17 Oct 2007 12:18:55 +0000 (12:18 +0000)]
fix an error message (barf -> sysErrorBelch)
Simon Marlow [Wed, 17 Oct 2007 12:16:45 +0000 (12:16 +0000)]
fix warning on Windows
Simon Marlow [Wed, 17 Oct 2007 10:09:08 +0000 (10:09 +0000)]
Don't clean gmp when validating (speeds up validation on Windows)
Simon Marlow [Tue, 25 Sep 2007 12:11:39 +0000 (12:11 +0000)]
document float2Int# and double2Int#
simonpj@microsoft.com [Wed, 17 Oct 2007 12:02:12 +0000 (12:02 +0000)]
Update HsExpr.hi-boot-6 for view pattern changes
simonpj@microsoft.com [Tue, 16 Oct 2007 13:18:40 +0000 (13:18 +0000)]
Fix #1709: do not expose the worker for a loop-breaker
The massive 'Uni' program produced a situation in which a function that
had a worker/wrapper split was chosen as a loop breaker. If the worker
is exposed in the interface file, then an importing module may go into
an inlining loop: see comments on TidyPgm.tidyWorker.
This patch fixes the inlining bug. The code that gives rise to this
bizarre case is still not good (it's a bunch of implication constraints
and we are choosing a bad loop breaker) but the first thing is to fix the
bug.
It's rather hard to produce a test case!
Please merge to the 6.8 branch.
simonpj@microsoft.com [Tue, 16 Oct 2007 12:47:10 +0000 (12:47 +0000)]
Fix #1662: do not simplify constraints for vanilla pattern matches
See Note [Arrows and patterns] in TcPat.
This fixes Trac 1662. Test is arrows/should_compile/arrowpat.hs
Please merge
simonpj@microsoft.com [Tue, 16 Oct 2007 12:46:06 +0000 (12:46 +0000)]
Eliminate over-zealous warning in CoreToStg
simonpj@microsoft.com [Tue, 16 Oct 2007 12:45:35 +0000 (12:45 +0000)]
Show inlined function in the header of 'Inlining done' message
simonpj@microsoft.com [Tue, 16 Oct 2007 12:44:50 +0000 (12:44 +0000)]
Show program size in the simplifier-bailing-out message
Dan Licata [Wed, 10 Oct 2007 15:02:54 +0000 (15:02 +0000)]
View patterns, record wildcards, and record puns
This patch implements three new features:
* view patterns (syntax: expression -> pat in a pattern)
* working versions of record wildcards and record puns
See the manual for detailed descriptions.
Other minor observable changes:
* There is a check prohibiting local fixity declarations
when the variable being fixed is not defined in the same let
* The warn-unused-binds option now reports warnings for do and mdo stmts
Implementation notes:
* The pattern renamer is now in its own module, RnPat, and the
implementation is now in a CPS style so that the correct context is
delivered to pattern expressions.
* These features required a fairly major upheaval to the renamer.
Whereas the old version used to collect up all the bindings from a let
(or top-level, or recursive do statement, ...) and put them into scope
before renaming anything, the new version does the collection as it
renames. This allows us to do the right thing with record wildcard
patterns (which need to be expanded to see what names should be
collected), and it allows us to implement the desired semantics for view
patterns in lets. This change had a bunch of domino effects brought on
by fiddling with the top-level renaming.
* Prior to this patch, there was a tricky bug in mkRecordSelId in HEAD,
which did not maintain the invariant necessary for loadDecl. See note
[Tricky iface loop] for details.
Simon Marlow [Mon, 15 Oct 2007 10:39:39 +0000 (10:39 +0000)]
FIX profiling after my storage manager changes
Manuel M T Chakravarty [Mon, 15 Oct 2007 07:56:44 +0000 (07:56 +0000)]
More docu for skolemOccurs
Manuel M T Chakravarty [Wed, 10 Oct 2007 14:20:23 +0000 (14:20 +0000)]
Slightly improved comments in TcTyClsDecls
Manuel M T Chakravarty [Thu, 4 Oct 2007 14:23:15 +0000 (14:23 +0000)]
TcTyFuns: remove some duplicate code
Manuel M T Chakravarty [Wed, 3 Oct 2007 14:57:15 +0000 (14:57 +0000)]
TcTyFuns.eqInstToRewrite
Simon Marlow [Fri, 12 Oct 2007 12:44:13 +0000 (12:44 +0000)]
Add allocateInGen() for allocating in a specific generation, and cleanups
Now allocate() is a synonym for allocateInGen().
I also made various cleanups: there is now less special-case code for
supporting -G1 (two-space collection), and -G1 now works with
-threaded.
Simon Marlow [Fri, 12 Oct 2007 10:38:10 +0000 (10:38 +0000)]
optimise isAlive()
Simon Marlow [Fri, 12 Oct 2007 10:17:11 +0000 (10:17 +0000)]
accounting wibble: we were missing an alloc_blocks++ in allocateLocal()
Simon Marlow [Fri, 12 Oct 2007 10:04:05 +0000 (10:04 +0000)]
threadStackOverflow should be using allocateLocal
andy@galois.com [Mon, 15 Oct 2007 03:33:19 +0000 (03:33 +0000)]
FIX #1759 while respecting the ticks
andy@galois.com [Sun, 14 Oct 2007 17:10:09 +0000 (17:10 +0000)]
Improving the combine mode for hpc
we now have
Processing Coverage files:
sum Sum multiple .tix files in a single .tix file
combine Combine two .tix files in a single .tix file
map Map a function over a single .tix file
Where sum joins many .tix files, combine joins two files (with
extra functionality possible), and map just applied a function
to single .tix file.
These changes were improvements driven by hpc use cases.
END OF DESCRIPTION***
Place the long patch description above the ***END OF DESCRIPTION*** marker.
The first line of this file will be the patch name.
This patch contains the following changes:
M ./utils/hpc/Hpc.hs -1 +3
M ./utils/hpc/HpcCombine.hs -33 +84
M ./utils/hpc/HpcFlags.hs -11 +59
simonpj@microsoft.com [Fri, 12 Oct 2007 16:23:25 +0000 (16:23 +0000)]
Fix DoCon: Another try at getting extractResults right
For some reason TcSimplify.extractResults is quite difficult to get right.
This is another attempt; finally I think I have it.
Strangely enough, it's only Sergey's DoCon program that shows up the
bug, which manifested as a failure in the Simplifier
lookupRecBndr $dGCDRing{v a1Lz} [lid]
But it was due to extractResults producing multiple bindings for
the same dictionary.
Please merge this to the stable branch (after previous patches to
TcSimplify though).
Simon Marlow [Thu, 11 Oct 2007 13:57:36 +0000 (13:57 +0000)]
mention what SCC stands for
Simon Marlow [Thu, 11 Oct 2007 13:55:05 +0000 (13:55 +0000)]
Add a proper write barrier for MVars
Previously MVars were always on the mutable list of the old
generation, which meant every MVar was visited during every minor GC.
With lots of MVars hanging around, this gets expensive. We addressed
this problem for MUT_VARs (aka IORefs) a while ago, the solution is to
use a traditional GC write-barrier when the object is modified. This
patch does the same thing for MVars.
TVars are still done the old way, they could probably benefit from the
same treatment too.
Simon Marlow [Wed, 10 Oct 2007 15:32:44 +0000 (15:32 +0000)]
we need to #include "Stg.h" first, we can't rely on GHC to inject it
This fixes the unreg build, and in general building the RTS code
via-C. I'm not sure at what stage this was broken, but I think it
was working accidentally before.
simonpj@microsoft.com [Thu, 11 Oct 2007 12:34:26 +0000 (12:34 +0000)]
Fix Trac #1680; check for unboxed tuples in TcType.marshalableTyCon
simonpj@microsoft.com [Wed, 10 Oct 2007 16:47:31 +0000 (16:47 +0000)]
Fix Trac #1759: do not let ticks get in the way of spotting trivially-true guards
GHC spots that an 'otherwise' guard is true, and uses that knowledge to
avoid reporting spurious missing-pattern or overlaps with -Wall.
The HPC ticks were disguising the 'otherwise', which led to this failure.
Now we check. The key change is defining DsGRHSs.isTrueLHsExpr.
Test is ds062
simonpj@microsoft.com [Wed, 10 Oct 2007 15:02:50 +0000 (15:02 +0000)]
Fix Trac #1755; check for stage errors in TH quoted Names
There are a number of situations in which you aren't allowed to use
a quoted Name in a TH program, such as
\x -> 'x
But we weren't checking for that! Now we are.
Merge to stable branch.
Test is TH_qname.
simonpj@microsoft.com [Wed, 10 Oct 2007 12:40:13 +0000 (12:40 +0000)]
checkWellStaged: reverse comparsion (no change in semantics), plus some comments
simonpj@microsoft.com [Wed, 10 Oct 2007 12:39:33 +0000 (12:39 +0000)]
Add traceTc in tcSimplifyDefault
simonpj@microsoft.com [Wed, 10 Oct 2007 12:37:26 +0000 (12:37 +0000)]
Improve pretty-printing of splices in HsSyn
simonpj@microsoft.com [Wed, 10 Oct 2007 14:57:05 +0000 (14:57 +0000)]
Fix Trac #1678; be more careful about catching and reporting exceptions in spliced TH monadic computations
Many of the new lines are comments to explain the slightly-convoluted
in which exceptions get propagated out of the Q monad.
This fixes Trac 1679; test is TH_runIO (as well as the exising TH_fail).
Please merge
simonpj@microsoft.com [Wed, 10 Oct 2007 14:56:46 +0000 (14:56 +0000)]
Comments only
Simon Marlow [Wed, 10 Oct 2007 10:37:04 +0000 (10:37 +0000)]
FIX BUILD (when compiling base via C): declare n_capabilities
Simon Marlow [Wed, 10 Oct 2007 09:32:41 +0000 (09:32 +0000)]
GHCi: use non-updatable thunks for breakpoints
The extra safe points introduced for breakpoints were previously
compiled as normal updatable thunks, but they are guaranteed
single-entry, so we can use non-updatable thunks here. This restores
the tail-call property where it was lost in some cases (although stack
squeezing probably often recovered it), and should improve
performance.
Simon Marlow [Wed, 10 Oct 2007 08:58:20 +0000 (08:58 +0000)]
FIX #1681: withBreakAction had too large a scope in runStmt
Simon Marlow [Tue, 9 Oct 2007 14:50:02 +0000 (14:50 +0000)]
tiny refactoring
Simon Marlow [Tue, 9 Oct 2007 14:53:05 +0000 (14:53 +0000)]
small reworking of the loop-breaker-choosing algorithm
Previously inline candidates were given higher preference as
non-loop-breakers than constructor applications, but the reason for
this was that making a wrapper into a loop-breaker is to be avoided at
all costs. This patch refines the algorithm slightly so that wrappers
are explicitly avoided by giving them a much higher score, and other
inline candidates are given lower scores than constructor
applications.
This makes almost zero difference to a complete nofib run, so it
amounts to just a tidyup.
Manuel M T Chakravarty [Wed, 10 Oct 2007 10:18:40 +0000 (10:18 +0000)]
Fix warnings when build w/o readline
Clemens Fruhwirth [Wed, 10 Oct 2007 07:44:15 +0000 (07:44 +0000)]
Update documentation for win32 DLL linking
simonpj@microsoft.com [Wed, 10 Oct 2007 09:33:34 +0000 (09:33 +0000)]
FIX: tidy up TcSimplify following equality constraints additions
The combination of "type refinement" for GADTs and the new equality
constraints has made TcSimplify rather complicated. And wrong:
it generated bogus code for cholewo-eval.
This patch is still far from entirely satisfactory. There are
too many places where invariants are unclear, and the code is
still a bit of a mess. But I believe it's better, and it passes
the regression tests! So I think it's good enough for the 6.8 release.
Please merge.
The main changes are:
- get rid of extractLocalResults (which was always suspicious)
- instead, treat the 'refinement' along with 'givens', by
adding a field to RedEnv, red_reft which travels with red_givens
- I also reworked extractResults a bit, which looked wrong to me
This entailed changing the Given constructor in Avail to take
an Inst rather than a TcId
simonpj@microsoft.com [Wed, 10 Oct 2007 09:30:58 +0000 (09:30 +0000)]
Improve pretty-printing for HsSyn
simonpj@microsoft.com [Sat, 29 Sep 2007 10:44:06 +0000 (10:44 +0000)]
Fix Trac #1746: make rule-matching work properly with Cast expressions
The Cast case of the rule-matcher was simply wrong.
This patch fixes it; see Trac #1746.
I also fixed the rule generation in SpecConstr to generate a wild-card
for the cast expression, which we don't want to match on. This makes
the rule more widely applicable; it wasn't the cause of the bug.
simonpj@microsoft.com [Sat, 29 Sep 2007 10:43:09 +0000 (10:43 +0000)]
Small comment only
Simon Marlow [Tue, 9 Oct 2007 14:27:01 +0000 (14:27 +0000)]
export n_capabilities, see #1733
Simon Marlow [Tue, 9 Oct 2007 14:25:54 +0000 (14:25 +0000)]
FIX #1743, create a fresh unique for each Id we bind at a breakpoint
Simon Marlow [Tue, 9 Oct 2007 13:09:42 +0000 (13:09 +0000)]
remove vestiges of way 'u' (see #1008)
Simon Marlow [Tue, 9 Oct 2007 12:24:09 +0000 (12:24 +0000)]
also call initMutex on every task->lock, see #1391
Simon Marlow [Tue, 9 Oct 2007 12:23:38 +0000 (12:23 +0000)]
remove the "-unreg" flag and the unregisterised way, see #1008
Simon Marlow [Tue, 9 Oct 2007 10:51:38 +0000 (10:51 +0000)]
warning removal
Simon Marlow [Wed, 3 Oct 2007 17:00:05 +0000 (17:00 +0000)]
warning removal
Simon Marlow [Wed, 3 Oct 2007 16:35:36 +0000 (16:35 +0000)]
refactoring only: use the parameterised InstalledPackageInfo
This required moving PackageId from PackageConfig to Module
Simon Marlow [Wed, 3 Oct 2007 17:40:16 +0000 (17:40 +0000)]
warning removal
Simon Marlow [Wed, 3 Oct 2007 17:34:48 +0000 (17:34 +0000)]
warning removal
Simon Marlow [Wed, 3 Oct 2007 17:32:02 +0000 (17:32 +0000)]
warning removal
Simon Marlow [Wed, 3 Oct 2007 17:27:15 +0000 (17:27 +0000)]
warning removal
Simon Marlow [Wed, 3 Oct 2007 09:08:04 +0000 (09:08 +0000)]
remove most warnings
Simon Marlow [Tue, 2 Oct 2007 11:49:17 +0000 (11:49 +0000)]
mkIfaceExports: sort the children of AvailTC
This fixes a problem with spurious recompilations: each time a module
was recompiled, the order of the children would change, causing extra
recompilation.
MERGE TO STABLE
Simon Marlow [Mon, 8 Oct 2007 13:49:58 +0000 (13:49 +0000)]
error message fix (#1758)
Thorkil Naur [Fri, 5 Oct 2007 14:41:05 +0000 (14:41 +0000)]
FIX validate for PPC Mac OS X - RegAllocStats.hs
Thorkil Naur [Fri, 5 Oct 2007 14:36:07 +0000 (14:36 +0000)]
FIX validate for PPC Mac OS X - RegAllocLinear.hs
Thorkil Naur [Fri, 5 Oct 2007 14:49:08 +0000 (14:49 +0000)]
FIX validate for PPC Mac OS X - Linker.c
Thorkil Naur [Fri, 5 Oct 2007 14:44:54 +0000 (14:44 +0000)]
FIX validate for PPC Mac OS X - Evac.h
Simon Marlow [Mon, 8 Oct 2007 13:13:05 +0000 (13:13 +0000)]
FIX #1748: -main-is wasn't handling the case of a single hierarchical module
test case is driver062.5
jochemberndsen@dse.nl [Thu, 27 Sep 2007 13:26:49 +0000 (13:26 +0000)]
FIX BUILD FD_SETSIZE signed
On FreeBSD FD_SETSIZE is unsigned. Cast it to a signed int
for portability.
jochemberndsen@dse.nl [Thu, 27 Sep 2007 13:26:19 +0000 (13:26 +0000)]
FIX BUILD addDLL returns const char*
addDLL returns const char*, not just a char*.
Fix compiler warning
jochemberndsen@dse.nl [Wed, 26 Sep 2007 20:37:50 +0000 (20:37 +0000)]
FIX BUILD `set -o igncr'-issue on FreeBSD
`set -o igncr' does not work on non-cygwin-systems.
Fail silently if this command does not work, instead
of aborting the build.
Simon Marlow [Mon, 8 Oct 2007 11:57:40 +0000 (11:57 +0000)]
comment-out "use vars" in 3 places (see #1739)
David Waern [Tue, 2 Oct 2007 14:38:49 +0000 (14:38 +0000)]
Change DOCOPTIONS pragma to DOC_OPTIONS
MERGE TO STABLE
David Waern [Tue, 2 Oct 2007 14:37:13 +0000 (14:37 +0000)]
FIX: parsing of doc options
Lexing of the doc options pragma was changed, but but no change was
made to the parser to reflect that. This patch fixes this problem.
MERGE TO STABLE
David Waern [Tue, 2 Oct 2007 14:34:59 +0000 (14:34 +0000)]
FIX: add missing case to OccName.isSymOcc
Manuel M T Chakravarty [Tue, 2 Oct 2007 13:07:36 +0000 (13:07 +0000)]
Remove warnings from WwLib
Manuel M T Chakravarty [Tue, 2 Oct 2007 13:04:07 +0000 (13:04 +0000)]
FIX: mkWWcpr takes open alg types into account
- This fixed the failures of GMapAssoc and GMapTop for optmising ways
MERGE TO STABLE
Manuel M T Chakravarty [Mon, 1 Oct 2007 15:43:43 +0000 (15:43 +0000)]
FIX #1738: KPush rule of FC must take dataConEqTheta into account
MERGE TO STABLE
Manuel M T Chakravarty [Sat, 29 Sep 2007 12:26:24 +0000 (12:26 +0000)]
FIX #1729: Don't try to expand syn families with -XLiberalTypeSynonyms
MERGE TO STABLE