Ian Lynagh [Wed, 5 Sep 2007 23:29:59 +0000 (23:29 +0000)]
Quote all the arguments to installPackage
Makes it obvious what's going on if any are empty.
Pepe Iborra [Thu, 6 Sep 2007 10:24:17 +0000 (10:24 +0000)]
warning police
Manuel M T Chakravarty [Thu, 6 Sep 2007 11:58:18 +0000 (11:58 +0000)]
Cleanup of equality rewriting and no swapInsts for wanteds
- Removed code duplication
- Added comments
- Took out swapInsts for wanteds. With the recent extension to swapInsts
it does mess up error messages if applied to wanteds and i should not be
necessary.
NB: The code actually shrunk. Line increase is due to comments.
Manuel M T Chakravarty [Thu, 6 Sep 2007 09:51:02 +0000 (09:51 +0000)]
Remove EqInsts from addSCs to avoid -DDEBUG warnings
Manuel M T Chakravarty [Thu, 6 Sep 2007 09:50:18 +0000 (09:50 +0000)]
EqInst related clean up
- Remove some unused and some superflous functions
- Add comments regarding ancestor equalities
- Tidied ancestor equality computation
- Replace some incorrect instToId by instToVar (but there are still some
bad ones around as we still get warnings with -DDEBUG)
- Some cleaned up layout
NB: Code growth is just due to more comments.
Manuel M T Chakravarty [Thu, 6 Sep 2007 03:17:19 +0000 (03:17 +0000)]
Remove dead code in TcSimplify
Manuel M T Chakravarty [Thu, 6 Sep 2007 02:39:14 +0000 (02:39 +0000)]
Fix -DDEBUG warning
Tom Schrijvers [Wed, 5 Sep 2007 13:44:26 +0000 (13:44 +0000)]
also swap for variables in completion algorithm
Simon Marlow [Thu, 6 Sep 2007 09:37:44 +0000 (09:37 +0000)]
FIX #1465, error messages could sometimes say things like "A.T doesn't match A.T"
This turned out to be a black hole, however we believe we now have a
plan that does the right thing and shouldn't need to change again.
Error messages will only ever refer to a name in an unambiguous way,
falling back to <package>:<module>.<name> if no unambiguous shorter
variant can be found. See HscTypes.mkPrintUnqualified for the
details.
Earlier hacks to work around this problem have been removed (TcSimplify).
Simon Marlow [Wed, 5 Sep 2007 11:25:03 +0000 (11:25 +0000)]
fix error in .hi-boot-6
Ben.Lippmeier@anu.edu.au [Wed, 5 Sep 2007 16:44:01 +0000 (16:44 +0000)]
Improve GraphColor.colorScan
Testing whether a node in the conflict graph is trivially
colorable (triv) is still a somewhat expensive operation.
When we find a triv node during scanning, even though we remove
it and its edges from the graph, this is unlikely to to make the
nodes we've just scanned become triv - so there's not much point
re-scanning them right away.
Scanning now takes place in passes. We scan the whole graph for
triv nodes and remove all the ones found in a batch before rescanning
old nodes.
Register allocation for SHA1.lhs now takes (just) 40% of total
compile time with -O2 -fregs-graph on x86
Roman Leshchinskiy [Thu, 6 Sep 2007 00:48:31 +0000 (00:48 +0000)]
Fix OS X warnings
Roman Leshchinskiy [Thu, 6 Sep 2007 00:16:13 +0000 (00:16 +0000)]
Declare ctime_r on Mac OS
On Mac OS, ctime_r is not declared in time.h if _POSIX_C_SOURCE is defined. We
work around this by providing a declaration ourselves.
Manuel M T Chakravarty [Wed, 5 Sep 2007 13:02:44 +0000 (13:02 +0000)]
FIX #1651: use family instances during interactive typechecking
Ian Lynagh [Wed, 5 Sep 2007 18:48:08 +0000 (18:48 +0000)]
Add an OPTIONS -w pragma to utils/genprimopcode/Lexer.xx
SPJ reports that it has warnings (=> errors with -Werror) on Windows.
Ian Lynagh [Wed, 5 Sep 2007 18:46:14 +0000 (18:46 +0000)]
Build settings for validation are now in mk/validate-settings.mk
Ian Lynagh [Wed, 5 Sep 2007 18:29:23 +0000 (18:29 +0000)]
Don't give warnings in compat
There are lots of warnings in here due to things like modules being
imported that, in some versions of GHC, aren't used. Thus we don't
give any warnings in here, and therefore validating with -Werror won't
make the build fail.
An alternative would be to do
SRC_HC_OPTS := $(filter-out -Werror,$(SRC_HC_OPTS))
but if warnings are expected then there is little point in spewing them
out anyway.
On the other hand, there aren't any warnings for me (GHC 6.6 on Linux/amd64),
so perhaps it would be worth fixing them instead.
Ian Lynagh [Wed, 5 Sep 2007 16:14:02 +0000 (16:14 +0000)]
Typo
Ian Lynagh [Wed, 5 Sep 2007 16:13:54 +0000 (16:13 +0000)]
Fix bindist creation on Windows
Ian Lynagh [Wed, 5 Sep 2007 16:06:41 +0000 (16:06 +0000)]
Fix up bindist creation and publishing
simonpj@microsoft.com [Wed, 5 Sep 2007 17:07:30 +0000 (17:07 +0000)]
Refactor, improve, and document the deriving mechanism
This patch does a fairly major clean-up of the code that implements 'deriving.
* The big changes are in TcDeriv, which is dramatically cleaned up.
In particular, there is a clear split into
a) inference of instance contexts for deriving clauses
b) generation of the derived code, given a context
Step (a) is skipped for standalone instance decls, which
have an explicitly provided context.
* The handling of "taggery", which is cooperative between TcDeriv and
TcGenDeriv, is cleaned up a lot
* I have added documentation for standalone deriving (which was
previously wrong).
* The Haskell report is vague on exactly when a deriving clause should
succeed. Prodded by Conal I have loosened the rules slightly, thereyb
making drv015 work again, and documented the rules in the user manual.
I believe this patch validates ok (once I've update the test suite)
and can go into the 6.8 branch.
simonpj@microsoft.com [Wed, 29 Aug 2007 08:33:49 +0000 (08:33 +0000)]
Further documentation about mdo, suggested by Benjamin Franksen
Ben.Lippmeier@anu.edu.au [Wed, 5 Sep 2007 12:52:19 +0000 (12:52 +0000)]
Refactor MachRegs.trivColorable to do unboxed accumulation
trivColorable was soaking up total 31% time, 41% alloc when
compiling SHA1.lhs with -O2 -fregs-graph on x86.
Refactoring to use unboxed accumulators and walk directly
over the UniqFM holding the set of conflicts reduces this
to 17% time, 6% alloc.
Norman Ramsey [Wed, 5 Sep 2007 16:48:02 +0000 (16:48 +0000)]
change of representation for GenCmm, GenCmmTop, CmmProc
The type parameter to a C-- procedure now represents a control-flow
graph, not a single instruction. The newtype ListGraph preserves the
current representation while enabling other representations and a
sensible way of prettyprinting. Except for a few changes in the
prettyprinter the new compiler binary should be bit-for-bit identical
to the old.
Norman Ramsey [Wed, 5 Sep 2007 16:46:46 +0000 (16:46 +0000)]
enable and slay warnings in cmm/Cmm.hs
Simon Marlow [Wed, 5 Sep 2007 11:42:05 +0000 (11:42 +0000)]
fix warnings
Simon Marlow [Wed, 5 Sep 2007 10:47:16 +0000 (10:47 +0000)]
FIX #1650: ".boot modules interact badly with the ghci debugger"
In fact hs-boot files had nothing to do with it: the problem was that
GHCi would forget the breakpoint information for a module that had
been reloaded but not recompiled. It's amazing that we never noticed
this before.
The ModBreaks were in the ModDetails, which was the wrong place. When
we avoid recompiling a module, ModDetails is regenerated from ModIface
by typecheckIface, and at that point it has no idea what the ModBreaks
should be, so typecheckIface made it empty. The right place for the
ModBreaks to go is with the Linkable, which is retained when
compilation is avoided. So now I've placed the ModBreaks in with the
CompiledByteCode, which also makes it clear that only byte-code
modules have breakpoints.
This fixes break022/break023
Simon Marlow [Wed, 5 Sep 2007 10:14:19 +0000 (10:14 +0000)]
Fix boot: it was avoiding autoreconfing
Two problems here: find needs to dereference symbolic links (-L
option, I really hope that's portable), and we need to notice when
aclocal.m4 is updated.
Somehow I think this was easier when it just always ran
autoreconf... what was wrong with that?
Simon Marlow [Tue, 4 Sep 2007 14:12:31 +0000 (14:12 +0000)]
don't generate .hi-boot/.o-boot files in GHCi
Simon Marlow [Tue, 4 Sep 2007 14:12:09 +0000 (14:12 +0000)]
refactoring only
Simon Marlow [Tue, 4 Sep 2007 10:44:58 +0000 (10:44 +0000)]
completion for modules in 'import M'
Simon Marlow [Tue, 4 Sep 2007 10:17:29 +0000 (10:17 +0000)]
make the GhcThreaded setting lazy, because GhcUnregisterised might not be set yet
Simon Marlow [Wed, 5 Sep 2007 08:49:41 +0000 (08:49 +0000)]
{Enter,Leave}CriticalSection imports should be outside #ifdef __PIC__
Ben.Lippmeier@anu.edu.au [Wed, 5 Sep 2007 09:45:09 +0000 (09:45 +0000)]
warning police
Ben.Lippmeier@anu.edu.au [Mon, 3 Sep 2007 16:34:04 +0000 (16:34 +0000)]
Do conservative coalescing in register allocator
Avoid coalescing nodes in the register conflict graph if the
new node will not be trivially colorable. Also remove the
front end aggressive coalescing pass.
For typical Haskell code the graph coloring allocator now does
about as well as the linear allocator.
For code with a large amount of register pressure it does much
better, but takes longer.
For SHA1.lhs from darcs on x86
spills reloads reg-reg-moves
inserted inserted left in code compile-time
linear 1068 1311 229 7.69(s)
graph 387 902 340 16.12(s)
Roman Leshchinskiy [Wed, 5 Sep 2007 05:22:13 +0000 (05:22 +0000)]
Use dlsym on OS X if available
On OS X 10.4 and newer, we have to use dlsym because the old NS* interface has
been deprecated. The patch checks for HAVE_DLFCN_H instead of switching on
the OS version.
There is one additional quirk: although OS X prefixes global symbols with an
underscore, dlsym expects its argument NOT to have a leading underscore. As a
hack, we simply strip it off in lookupSymbol. Something a bit more elaborate
might be cleaner.
Tom Schrijvers [Tue, 4 Sep 2007 12:39:45 +0000 (12:39 +0000)]
bug fix in Decomp step of completion algorithm for given equations
Tom Schrijvers [Tue, 4 Sep 2007 08:00:14 +0000 (08:00 +0000)]
fix of wanted equational class context
Previously failed to account for equational
class context for wanted dictionary contraints, e.g. wanted C a
in
class a ~ Int => C a
instance C Int
should give rise to wanted a ~ Int and consequently discharge a ~ Int by
unifying a with Int and then discharge C Int with the instance.
All ancestor equalities are taken into account.
Ian Lynagh [Wed, 5 Sep 2007 01:32:39 +0000 (01:32 +0000)]
Set datarootdir to the value configure gives us (if any) so datadir works
We then set datarootdir to something else later on so that things still
work when configure doesn't set it.
Manuel M T Chakravarty [Wed, 5 Sep 2007 01:02:17 +0000 (01:02 +0000)]
FIX: Correct Leave/EnterCriticalSection imports
sven.panne@aedion.de [Tue, 4 Sep 2007 17:28:55 +0000 (17:28 +0000)]
Don't hardwire the build path into the Haddock docs
Formerly, the ghc-pkg was called to get the HTML dirs for other packages, but
of course doing this at *build* time is totally wrong. Now we use a relative
path, just like before. This is probably not perfect, but much better than
before.
As a sidenote: Cabal calls the relevant flag "html-location", ghc-pkg calls the
field "haddock-html", and Haddock itself uses it as part of "read-interface".
Too much creativity is sometimes a bad thing...
Simon Marlow [Tue, 4 Sep 2007 14:28:53 +0000 (14:28 +0000)]
put the @N suffix on stdcall foreign calls in .cmm code
This applies to EnterCriticalSection and LeaveCriticalSection in the RTS
Ian Lynagh [Tue, 4 Sep 2007 14:10:28 +0000 (14:10 +0000)]
Add a -Warn flag
Ian Lynagh [Tue, 4 Sep 2007 14:03:24 +0000 (14:03 +0000)]
Always turn on -Wall -Werror when compiling the compiler, even for stage 1
Ian Lynagh [Tue, 4 Sep 2007 14:01:15 +0000 (14:01 +0000)]
Fix CodingStyle#Warnings URLs
Simon Marlow [Tue, 4 Sep 2007 10:06:23 +0000 (10:06 +0000)]
OPTIONS_GHC overrides the command-line, not the other way around
Simon Marlow [Tue, 4 Sep 2007 10:05:26 +0000 (10:05 +0000)]
fix cut-and-pasto
Manuel M T Chakravarty [Tue, 4 Sep 2007 07:25:42 +0000 (07:25 +0000)]
FIX #1651: unBox types when deferring unification
- This fixes the first part of #1651; ie, the panic in ghci.
Manuel M T Chakravarty [Mon, 3 Sep 2007 07:45:28 +0000 (07:45 +0000)]
Better error message for unsolvable equalities
Ian Lynagh [Mon, 3 Sep 2007 23:51:17 +0000 (23:51 +0000)]
Use := rather than = when assigning make variables to avoid cycles
Ian Lynagh [Mon, 3 Sep 2007 23:45:04 +0000 (23:45 +0000)]
Don't use autoconf's datarootdir as <2.60 doesn't have it
Ian Lynagh [Mon, 3 Sep 2007 23:39:03 +0000 (23:39 +0000)]
Use OPTIONS rather than OPTIONS_GHC for pragmas
Older GHCs can't parse OPTIONS_GHC.
This also changes the URL referenced for the -w options from
WorkingConventions#Warnings to CodingStyle#Warnings for the compiler
modules.
Ian Lynagh [Mon, 3 Sep 2007 16:58:47 +0000 (16:58 +0000)]
Fix building RTS with gcc 2.*; declare all variables at the top of a block
Patch from Audrey Tang.
Simon Marlow [Mon, 3 Sep 2007 20:06:15 +0000 (20:06 +0000)]
fix build (sorry, forgot to push with previous patch)
Simon Marlow [Mon, 3 Sep 2007 20:00:03 +0000 (20:00 +0000)]
remove debugging code
Ben.Lippmeier@anu.edu.au [Mon, 3 Sep 2007 13:22:54 +0000 (13:22 +0000)]
NCG space leak avoidance refactor
Ben.Lippmeier@anu.edu.au [Mon, 3 Sep 2007 11:51:49 +0000 (11:51 +0000)]
Do aggressive register coalescing
Conservative and iterative coalescing come next.
Ben.Lippmeier@anu.edu.au [Tue, 28 Aug 2007 14:44:24 +0000 (14:44 +0000)]
Add coalescence edges back to the register graph
Simon Marlow [Mon, 3 Sep 2007 13:25:23 +0000 (13:25 +0000)]
FIX #1623: disable the timer signal when the system is idle (threaded RTS only)
Having a timer signal go off regularly is bad for power consumption,
and generally bad practice anyway (it means the app cannot be
completely swapped out, for example). Fortunately the threaded RTS
already had a way to detect when the system was idle, so that it can
trigger a GC and thereby find deadlocks. After performing the GC, we
now turn off timer signals, and re-enable them again just before
running any Haskell code.
Simon Marlow [Mon, 3 Sep 2007 13:16:25 +0000 (13:16 +0000)]
FIX #1648: rts_mkWord64 was missing
Also noticed a few others from RtsAPI were missing, so I added them all
Ross Paterson [Mon, 3 Sep 2007 14:10:44 +0000 (14:10 +0000)]
FIX for #1080
Arrow desugaring now uses a private version of collectPatBinders and
friends, in order to include dictionary bindings from ConPatOut.
It doesn't fix arrowrun004 (#1333), though.
Ben.Lippmeier@anu.edu.au [Fri, 31 Aug 2007 09:04:31 +0000 (09:04 +0000)]
Fix space leak in NCG
Simon Marlow [Mon, 3 Sep 2007 10:38:29 +0000 (10:38 +0000)]
GhcThreaded was bogusly off by default due to things being in the wrong order
Simon Marlow [Mon, 3 Sep 2007 10:19:12 +0000 (10:19 +0000)]
bump MAX_THUNK_SELECTOR_DEPTH from 8 to 16
this "fixes" #1038, in that the example runs in constant space, but
it's really only working around the problem. I have a better patch,
attached to ticket #1038, but I'm wary about tinkering with this
notorious bug farm so close to the release, so I'll push it after
6.8.1.
Simon Marlow [Fri, 31 Aug 2007 09:22:24 +0000 (09:22 +0000)]
comments only
I had planned to do findEnclosingDecl a different way, so add a ToDo
as a reminder.
Ian Lynagh [Sun, 2 Sep 2007 22:20:48 +0000 (22:20 +0000)]
Suppress some warnings on Windows
Ian Lynagh [Sun, 2 Sep 2007 22:14:42 +0000 (22:14 +0000)]
Fix warnings in ghc-pkg on Windows
Ian Lynagh [Sun, 2 Sep 2007 19:39:18 +0000 (19:39 +0000)]
Fix and supress some warnings, and turn on -Werror when validating
sven.panne@aedion.de [Sun, 2 Sep 2007 16:43:42 +0000 (16:43 +0000)]
Explicitly set "docdir" when calling make, configure's --docdir seems to be ignored
sven.panne@aedion.de [Sat, 1 Sep 2007 17:51:24 +0000 (17:51 +0000)]
Use DESTDIR for installation
sven.panne@aedion.de [Sat, 1 Sep 2007 12:46:15 +0000 (12:46 +0000)]
Fixed TeX syntax
Ian Lynagh [Sat, 1 Sep 2007 11:30:18 +0000 (11:30 +0000)]
Set -Wall -fno-warn-name-shadowing in compiler/ when stage /= 2
Ian Lynagh [Sat, 1 Sep 2007 11:21:30 +0000 (11:21 +0000)]
Add {-# OPTIONS_GHC -w #-} and some blurb to all compiler modules
Ian Lynagh [Fri, 31 Aug 2007 23:15:38 +0000 (23:15 +0000)]
Add a --print-docdir flag
Ian Lynagh [Fri, 31 Aug 2007 18:13:59 +0000 (18:13 +0000)]
Follow Cabal module movements in installPackage
Ian Lynagh [Fri, 31 Aug 2007 17:52:17 +0000 (17:52 +0000)]
Follow Cabal's move Distribution.Program -> Distribution.Simple.Program
Ian Lynagh [Fri, 31 Aug 2007 17:39:03 +0000 (17:39 +0000)]
Don't use the --docdir etc that autoconf provides
Older autoconfs (<2.60?) don't understand them.
judah.jacobson@gmail.com [Fri, 31 Aug 2007 05:03:21 +0000 (05:03 +0000)]
Don't try to copy haddock index files if we haven't built the docs.
M ./libraries/Makefile +2
judah.jacobson@gmail.com [Fri, 31 Aug 2007 05:02:15 +0000 (05:02 +0000)]
Use cp -R instead of cp -a (it's more portable).
M ./libraries/Makefile -3 +3
Ian Lynagh [Fri, 31 Aug 2007 01:54:42 +0000 (01:54 +0000)]
Fix installing the libraries when there is no DESTDIR
Ian Lynagh [Fri, 31 Aug 2007 01:45:37 +0000 (01:45 +0000)]
Make the doc index page obey DESTDIR
Ian Lynagh [Fri, 31 Aug 2007 01:43:46 +0000 (01:43 +0000)]
Make rts docs obey DESTDIR
Ian Lynagh [Fri, 31 Aug 2007 01:42:53 +0000 (01:42 +0000)]
Make the manpage obey DESTDIR
Ian Lynagh [Fri, 31 Aug 2007 01:23:51 +0000 (01:23 +0000)]
Obey DESTDIR when installing library docs
Simon Marlow [Thu, 30 Aug 2007 14:31:05 +0000 (14:31 +0000)]
typo in DLL code
Simon Marlow [Thu, 30 Aug 2007 13:51:46 +0000 (13:51 +0000)]
Windows: give a better error message when running out of memory
I think this fixes #1209
Previously:
outofmem.exe: getMBlocks: VirtualAlloc MEM_RESERVE 1025 blocks failed: Not enoug
h storage is available to process this command.
Now:
outofmem.exe: out of memory
Roman Leshchinskiy [Fri, 31 Aug 2007 04:54:11 +0000 (04:54 +0000)]
Remove NDP-related stuff from PrelNames
We don't need fixed Names for NDP built-ins. Instead, we can look them up
ourselves during VM initialisation.
Roman Leshchinskiy [Fri, 31 Aug 2007 04:18:22 +0000 (04:18 +0000)]
Vectorisation of enumeration types
Roman Leshchinskiy [Fri, 31 Aug 2007 03:25:28 +0000 (03:25 +0000)]
Number data constructors from 0 when vectorising
Roman Leshchinskiy [Fri, 31 Aug 2007 03:21:25 +0000 (03:21 +0000)]
Rename functions
Roman Leshchinskiy [Fri, 31 Aug 2007 01:53:12 +0000 (01:53 +0000)]
Refactoring
Roman Leshchinskiy [Fri, 31 Aug 2007 01:26:38 +0000 (01:26 +0000)]
Refactoring
Roman Leshchinskiy [Fri, 31 Aug 2007 00:59:12 +0000 (00:59 +0000)]
Fix vectorisation of nullary data constructors
Roman Leshchinskiy [Thu, 30 Aug 2007 06:29:58 +0000 (06:29 +0000)]
Do not unnecessarily wrap array components
Roman Leshchinskiy [Thu, 30 Aug 2007 05:54:44 +0000 (05:54 +0000)]
Remove dead code
Roman Leshchinskiy [Thu, 30 Aug 2007 04:02:52 +0000 (04:02 +0000)]
Fix vectorisation of unary data constructors
Roman Leshchinskiy [Thu, 30 Aug 2007 03:52:25 +0000 (03:52 +0000)]
Fix vectorisation of sum type constructors
Roman Leshchinskiy [Thu, 30 Aug 2007 03:21:04 +0000 (03:21 +0000)]
Track changes to package ndp (use PArray_Int# instead of UArr Int)
Roman Leshchinskiy [Thu, 30 Aug 2007 02:52:24 +0000 (02:52 +0000)]
Find the correct array type for primitive tycons
Roman Leshchinskiy [Thu, 30 Aug 2007 01:42:57 +0000 (01:42 +0000)]
Add code for looking up PA methods of primitive TyCons