Ian Lynagh [Sat, 27 Mar 2010 18:21:26 +0000 (18:21 +0000)]
Fix the format specifier for Int64/Word64 on Windows
mingw doesn't understand %llu/%lld - it treats them as 32-bit rather
than 64-bit. We use %I64u/%I64d instead.
Ian Lynagh [Fri, 26 Mar 2010 23:59:34 +0000 (23:59 +0000)]
Fix the ghci startmenu item
I'm not sure what changed, but it now doesn't work for me without
the "Start in" field being set.
Ian Lynagh [Fri, 26 Mar 2010 15:59:17 +0000 (15:59 +0000)]
Fix paths to docs in "Start Menu" entries in Windows installer; fixes #3847
Ian Lynagh [Fri, 26 Mar 2010 15:51:30 +0000 (15:51 +0000)]
Add a licence file for the Windows installer to use
Ian Lynagh [Fri, 26 Mar 2010 15:47:14 +0000 (15:47 +0000)]
Add gcc-g++ to the inplace mingw installation; fixes #3893
Ian Lynagh [Fri, 26 Mar 2010 15:24:49 +0000 (15:24 +0000)]
Add the licence file to the Windows installer. Fixes #3934
Ian Lynagh [Thu, 25 Mar 2010 14:34:49 +0000 (14:34 +0000)]
Quote the paths to alex and happy in configure
Ian Lynagh [Thu, 25 Mar 2010 13:32:37 +0000 (13:32 +0000)]
Use </> rather than ++ "/"
This stops us generating paths like
c:\foo\/ghc460_0/ghc460_0.o
which windres doesn't understand.
Ian Lynagh [Wed, 24 Mar 2010 23:34:47 +0000 (23:34 +0000)]
Append $(exeext) to utils/ghc-pkg_dist_PROG
Fixes bindist creation
Simon Marlow [Thu, 25 Mar 2010 11:05:00 +0000 (11:05 +0000)]
A sanity check
Simon Marlow [Thu, 25 Mar 2010 11:03:28 +0000 (11:03 +0000)]
do_checks: do not set HpAlloc if the stack check fails
This fixes a very rare heap corruption bug, whereby
- a context switch is requested, which sets HpLim to zero
(contextSwitchCapability(), called by the timer signal or
another Capability).
- simultaneously a stack check fails, in a code fragment that has
both a stack and a heap check.
The RTS then assumes that a heap-check failure has occurred and
subtracts HpAlloc from Hp, although in fact it was a stack-check
failure and retreating Hp will overwrite valid heap objects. The bug
is that HpAlloc should only be set when Hp has been incremented by the
heap check. See comments in rts/HeapStackCheck.cmm for more details.
This bug is probably incredibly rare in practice, but I happened to be
working on a test that triggers it reliably:
concurrent/should_run/throwto001, compiled with -O -threaded, args 30
300 +RTS -N2, run repeatedly in a loop.
Simon Marlow [Thu, 25 Mar 2010 10:46:17 +0000 (10:46 +0000)]
comments and formatting only
Ian Lynagh [Wed, 24 Mar 2010 17:14:22 +0000 (17:14 +0000)]
Change how perl scripts get installed; partially fixes #3863
We now regenerate them when installing, which means the path for perl
doesn't get baked in
Ian Lynagh [Wed, 24 Mar 2010 17:14:08 +0000 (17:14 +0000)]
Pass the location of gcc in the ghc wrapper script; partially fixes #3863
This means we don't rely on baking a path to gcc into the executable
Ian Lynagh [Wed, 24 Mar 2010 16:20:43 +0000 (16:20 +0000)]
Quote the ar path in configure
Ian Lynagh [Wed, 24 Mar 2010 14:50:48 +0000 (14:50 +0000)]
Remove unused cUSER_WAY_NAMES cUSER_WAY_OPTS
Ian Lynagh [Wed, 24 Mar 2010 14:50:13 +0000 (14:50 +0000)]
Remove unused cCONTEXT_DIFF
Ian Lynagh [Wed, 24 Mar 2010 14:48:41 +0000 (14:48 +0000)]
Remove unused cEnableWin32DLLs
Ian Lynagh [Wed, 24 Mar 2010 14:46:56 +0000 (14:46 +0000)]
Remove unused cGHC_CP
Ian Lynagh [Wed, 24 Mar 2010 13:29:07 +0000 (13:29 +0000)]
Fix the build for non-GNU-ar
Ian Lynagh [Tue, 23 Mar 2010 22:13:25 +0000 (22:13 +0000)]
Tweak the Makefile code for making .a libs; fixes trac #3642
The main change is that, rather than using "xargs ar" we now put
all the filenames into a file, and do "ar @file". This means that
ar adds all the files at once, which works around a problem where
files with the same basename in a later invocation were overwriting
the existing file in the .a archive.
Ian Lynagh [Sat, 20 Mar 2010 23:14:14 +0000 (23:14 +0000)]
Enable shared libraries on Windows; fixes trac #3879
Ian Lynagh [Sun, 21 Mar 2010 16:19:09 +0000 (16:19 +0000)]
Add the external core PDF to the new build system
Ian Lynagh [Sun, 21 Mar 2010 11:28:35 +0000 (11:28 +0000)]
Allow specifying $threads directly when validating
Ian Lynagh [Sat, 20 Mar 2010 21:38:37 +0000 (21:38 +0000)]
Remove LazyUniqFM; fixes trac #3880
Simon Marlow [Fri, 19 Mar 2010 15:34:13 +0000 (15:34 +0000)]
UNDO: slight improvement to scavenging ...
Accidnetally pushed this patch which, while it validates, isn't
correct.
rolling back:
Fri Mar 19 11:21:27 GMT 2010 Simon Marlow <marlowsd@gmail.com>
* slight improvement to scavenging of update frames when a collision has occurred
M ./rts/sm/Scav.c -19 +15
Simon Marlow [Fri, 19 Mar 2010 11:21:27 +0000 (11:21 +0000)]
slight improvement to scavenging of update frames when a collision has occurred
Ian Lynagh [Wed, 17 Mar 2010 21:27:09 +0000 (21:27 +0000)]
Don't install the utf8-string package
Ian Lynagh [Tue, 16 Mar 2010 23:33:57 +0000 (23:33 +0000)]
Don't use -Bsymbolic when linking the RTS
This makes the RTS hooks work when doing dynamic linking
simonpj@microsoft.com [Wed, 17 Mar 2010 12:35:19 +0000 (12:35 +0000)]
Fix Trac #3920: Template Haskell kinds
Fix two places where we were doing foldl instead of foldr
after decomposing a Kind. Strange that the same bug appears
in two quite different places!
Simon Marlow [Tue, 16 Mar 2010 14:31:03 +0000 (14:31 +0000)]
copy_tag_nolock(): fix write ordering and add a write_barrier()
Fixes a rare crash in the parallel GC.
If we copy a closure non-atomically during GC, as we do for all
immutable values, then before writing the forwarding pointer we better
make sure that the closure itself is visible to other threads that
might follow the forwarding pointer. I imagine this doesn't happen
very often, but I just found one case of it: in scavenge_stack, the
RET_FUN case, after evacuating ret_fun->fun we then follow it and look
up the info pointer.
benl@ouroborus.net [Tue, 16 Mar 2010 06:05:17 +0000 (06:05 +0000)]
Add sliceP mapping to vectoriser builtins
benl@ouroborus.net [Thu, 11 Mar 2010 06:45:18 +0000 (06:45 +0000)]
Comments only
Ian Lynagh [Mon, 15 Mar 2010 17:35:41 +0000 (17:35 +0000)]
When saying RTS options are disabled, also say how to enable them
Simon Marlow [Mon, 15 Mar 2010 09:32:56 +0000 (09:32 +0000)]
Fix profiling build following removal of specific STM object types
Ian Lynagh [Sun, 14 Mar 2010 17:20:18 +0000 (17:20 +0000)]
When compiling with GHC >= 6.13, use -rtsopts
Ian Lynagh [Sun, 14 Mar 2010 14:08:47 +0000 (14:08 +0000)]
Document the new RTS linker flags
Ian Lynagh [Sun, 14 Mar 2010 13:36:48 +0000 (13:36 +0000)]
Don't enable RTS options by default
Ian Lynagh [Sat, 13 Mar 2010 23:13:42 +0000 (23:13 +0000)]
Add a -with-rtsopts link-time flag
You can now link with
-with-rtsopts="-H128m -K1m"
Ian Lynagh [Sat, 13 Mar 2010 22:48:52 +0000 (22:48 +0000)]
Rename a variable
Ian Lynagh [Sat, 13 Mar 2010 15:45:55 +0000 (15:45 +0000)]
Add a link-time flag to en/disable the RTS options
If RTS options are disabled then:
* The ghc_rts_opts C code variable is processed as normal
* The GHCRTS environment variable is ignored and, if it is defined, a
warning is emitted
* The +RTS flag gives an error and terminates the program
Simon Marlow [Thu, 11 Mar 2010 12:37:05 +0000 (12:37 +0000)]
Fix a couple of bugs in the throwTo handling, exposed by conc016(threaded2)
Simon Marlow [Thu, 11 Mar 2010 09:57:44 +0000 (09:57 +0000)]
Use message-passing to implement throwTo in the RTS
This replaces some complicated locking schemes with message-passing
in the implementation of throwTo. The benefits are
- previously it was impossible to guarantee that a throwTo from
a thread running on one CPU to a thread running on another CPU
would be noticed, and we had to rely on the GC to pick up these
forgotten exceptions. This no longer happens.
- the locking regime is simpler (though the code is about the same
size)
- threads can be unblocked from a blocked_exceptions queue without
having to traverse the whole queue now. It's a rare case, but
replaces an O(n) operation with an O(1).
- generally we move in the direction of sharing less between
Capabilities (aka HECs), which will become important with other
changes we have planned.
Also in this patch I replaced several STM-specific closure types with
a generic MUT_PRIM closure type, which allowed a lot of code in the GC
and other places to go away, hence the line-count reduction. The
message-passing changes resulted in about a net zero line-count
difference.
Simon Marlow [Thu, 11 Mar 2010 09:36:32 +0000 (09:36 +0000)]
fix bug in discardTasksExcept() that broke forkProcess
Simon Marlow [Mon, 23 Nov 2009 11:04:16 +0000 (11:04 +0000)]
disable a false assertion, add a comment to explain why
simonpj@microsoft.com [Tue, 9 Mar 2010 17:35:55 +0000 (17:35 +0000)]
Fix Trac #1954: newtype deriving caused 'defined but not used' error
We were getting a bogus claim that a newtype "data constructor" was
unused. The fix is easy, although I had to add a field to the constructor
TcEnv.NewTypeDerived
See Note [Newtype deriving and unused constructors] in TcDeriv
simonpj@microsoft.com [Tue, 9 Mar 2010 17:33:27 +0000 (17:33 +0000)]
Rule binders shouldn't have IdInfo
While I was looking at the rule binders generated in DsBinds for specialise pragmas,
I also looked at Specialise. It too was "cloning" the dictionary binders including
their IdInfo. In this case they should not have any, but its seems better to make
them completely fresh rather than substitute in existing (albeit non-existent) IdInfo.
simonpj@microsoft.com [Tue, 9 Mar 2010 17:31:20 +0000 (17:31 +0000)]
Add comment
simonpj@microsoft.com [Tue, 9 Mar 2010 17:31:00 +0000 (17:31 +0000)]
Rule binders shouldn't have DFun pragmas
When DsBinds deals with a SPECIALISE pragma, it makes up the binders
for a RULE. These binders should be very vanilla: no IdInfo of any sort.
But the way it was before they could have DFun pragmas, which led to
Bad Joss downstream. (Actually to cause a downstream *error* was itself
a bug, which I've fixed, but it's clearly wrong for them to be DFuns!)
simonpj@microsoft.com [Tue, 9 Mar 2010 17:28:42 +0000 (17:28 +0000)]
A bug in isClosedUnfolding
isClosedUnfolding should say False for DFUnUnfolding!
simonpj@microsoft.com [Tue, 9 Mar 2010 17:28:14 +0000 (17:28 +0000)]
Comments only
simonpj@microsoft.com [Tue, 9 Mar 2010 17:27:56 +0000 (17:27 +0000)]
Comments and type signatures only
simonpj@microsoft.com [Tue, 9 Mar 2010 17:27:43 +0000 (17:27 +0000)]
Comments only
simonpj@microsoft.com [Tue, 9 Mar 2010 17:27:30 +0000 (17:27 +0000)]
Tidy up pretty-printing of InlinePragma
We were getting "INLINEALWAYS" printed out here and there.
Now there are always brackets around the activation, thus "INLINE[ALWAYS]"
Simon Marlow [Tue, 9 Mar 2010 14:31:11 +0000 (14:31 +0000)]
Split part of the Task struct into a separate struct InCall
The idea is that this leaves Tasks and OSThread in one-to-one
correspondence. The part of a Task that represents a call into
Haskell from C is split into a separate struct InCall, pointed to by
the Task and the TSO bound to it. A given OSThread/Task thus always
uses the same mutex and condition variable, rather than getting a new
one for each callback. Conceptually it is simpler, although there are
more types and indirections in a few places now.
This improves callback performance by removing some of the locks that
we had to take when making in-calls. Now we also keep the current Task
in a thread-local variable if supported by the OS and gcc (currently
only Linux).
Simon Marlow [Tue, 9 Mar 2010 13:37:21 +0000 (13:37 +0000)]
add a note
Simon Marlow [Tue, 9 Mar 2010 09:58:31 +0000 (09:58 +0000)]
Fix a rare deadlock when the IO manager thread is slow to start up
This fixes occasional failures of ffi002(threaded1) on a loaded
machine.
simonpj@microsoft.com [Fri, 5 Mar 2010 17:30:04 +0000 (17:30 +0000)]
When BUILD_DOCBOOK_HTML is NO, keep the rules, just omit the target
(and similarly for PS and PDF)
The previous setup nuked the rules for making the documentation when
BUILD_DOCBOOK_HTML=NO. This meant that "make html" didn't work.
There isn't any reason to nuke the rules (so far as Simon and I know).
simonpj@microsoft.com [Fri, 5 Mar 2010 17:27:59 +0000 (17:27 +0000)]
Fix Trac #3736: do not preInlineUnconditionally with INLINE
preInlineUnconditionally was, in effect, nuking an INLINE pragma, with
very bad effect on runtime in this program. Fortunately the fix is
very simple.
See Note [InlineRule and preInlineUnconditionally] in SimplUtils.
simonpj@microsoft.com [Thu, 4 Mar 2010 12:59:30 +0000 (12:59 +0000)]
Comments only
simonpj@microsoft.com [Thu, 4 Mar 2010 12:54:02 +0000 (12:54 +0000)]
Comments only
simonpj@microsoft.com [Thu, 4 Mar 2010 12:53:37 +0000 (12:53 +0000)]
Refactor part of the renamer to fix Trac #3901
This one was bigger than I anticipated! The problem was that were
were gathering the binders from a pattern before renaming -- but with
record wild-cards we don't know what variables are bound by C {..}
until after the renamer has filled in the "..".
So this patch does the following
* Change all the collect-X-Binders functions in HsUtils so that
they expect to only be called *after* renaming. That means they
don't need to return [Located id] but just [id]. Which turned out
to be a very worthwhile simplification all by itself.
* Refactor the renamer, and in ptic RnExpr.rnStmt, so that it
doesn't need to use collectLStmtsBinders on pre-renamed Stmts.
* This in turn required me to understand how GroupStmt and
TransformStmts were renamed. Quite fiddly. I rewrote most of it;
result is much shorter.
* In doing so I flattened HsExpr.GroupByClause into its parent
GroupStmt, with trivial knock-on effects in other files.
Blargh.
simonpj@microsoft.com [Thu, 4 Mar 2010 12:41:13 +0000 (12:41 +0000)]
Minor refactoring of placeHolderPunRhs
simonpj@microsoft.com [Thu, 4 Mar 2010 12:40:29 +0000 (12:40 +0000)]
Make `mkFunTy` associate to the right, as it should
simonpj@microsoft.com [Thu, 4 Mar 2010 12:40:04 +0000 (12:40 +0000)]
Add fmapMaybeM and fmapEitherM
simonpj@microsoft.com [Thu, 4 Mar 2010 12:39:39 +0000 (12:39 +0000)]
Comments only
simonpj@microsoft.com [Thu, 4 Mar 2010 12:38:22 +0000 (12:38 +0000)]
Two things to do with -dsuppress-uniques
a) Even with -dsuppress-uniques, don't suppress them when outputing
code, else the assembler falls over bleating
b) Do suppress uniques in names generated by TH. It's a bit grungy
to do this: see Note [Suppressing uniques in OccNames]. But
it's only needed for test de-wobblification so the grunge isn't
really important.
Simon Marlow [Thu, 4 Mar 2010 09:21:19 +0000 (09:21 +0000)]
fix the Windows build some more
simonpj@microsoft.com [Wed, 3 Mar 2010 21:59:48 +0000 (21:59 +0000)]
Add comments to darcs-all and packages
Simon Marlow [Wed, 3 Mar 2010 11:22:42 +0000 (11:22 +0000)]
Add the implicit 'import Prelude' in getImports
This makes things more consistent, and avoids a strange "Prelude is
not loaded" error when there is a Prelude.hs on the search path.
Simon Marlow [Tue, 2 Mar 2010 14:47:19 +0000 (14:47 +0000)]
fix Windows build
Simon Marlow [Tue, 2 Mar 2010 09:43:38 +0000 (09:43 +0000)]
sdist: Haddock.Interface.{Lex,Parse} moved to Haddock.{Lex,Parse}
Ian Lynagh [Tue, 2 Mar 2010 20:58:15 +0000 (20:58 +0000)]
Add handling for | to the transitional alternative layout rule
Ian Lynagh [Tue, 2 Mar 2010 20:51:05 +0000 (20:51 +0000)]
Tweak alternative layout rule
Now not only is if/then a bracketting pair, but then/else is too
Ian Lynagh [Tue, 2 Mar 2010 20:20:35 +0000 (20:20 +0000)]
Add transitional rules for the alternative layout rule
If enabled, these accept more layout, but give warnings
Ian Lynagh [Tue, 2 Mar 2010 16:51:19 +0000 (16:51 +0000)]
Fix the alternative layout rule to handle explicit let/in
It used to break on
let {x = 'a'} in x
as the 'in' token would keep closing contexts looking for an implicit
'let' layout.
Simon Marlow [Mon, 1 Mar 2010 09:55:25 +0000 (09:55 +0000)]
expand comments for #2578 fix
ich@christoph-bauer.net [Sat, 27 Feb 2010 21:16:59 +0000 (21:16 +0000)]
a faster appendFS
simonpj@microsoft.com [Mon, 1 Mar 2010 11:17:44 +0000 (11:17 +0000)]
Implement a smart constructor mkUnsafeCoercion, and use it
This just ensures that an unsafe coercion is as localised as possible.
For example, instead of
UnsafeCo (Int -> t1) (Int -> t2)
use
Int -> UnsafeCo t1 t2
simonpj@microsoft.com [Mon, 1 Mar 2010 11:15:55 +0000 (11:15 +0000)]
Suggest -XGeneralizedNewtypeDeriving (fix Trac #3888)
If we can't derive a type, but it's a reasonable possibility that
newtype deriving would do the job, suggest it.
A little refactoring too, moving non_iso_class to top level,
and putting it with std_class_via_iso.
simonpj@microsoft.com [Mon, 1 Mar 2010 11:14:01 +0000 (11:14 +0000)]
Tidy up AnyTyCon stuff
If we find ourselves making up an AnyTyCon of kind '??', say,
then default it to liftedTypeKind. And similarly for any sub-kind
of LiftedTypeKind.
This is just a tidy-up.
simonpj@microsoft.com [Mon, 1 Mar 2010 11:10:40 +0000 (11:10 +0000)]
Fix pretty-printing of IfaceAnyTc (fixes Trac #3883)
The panic message in ifaceTyConName on IfaceAnyTc
called the pretty-printer, called ifaceTyConName again,
which caused an infinite regress. Stupid.
See
* Note [The Name of an IfaceAnyTc], and
* The Outputable instance for IfaceTyCon
simonpj@microsoft.com [Mon, 1 Mar 2010 11:07:48 +0000 (11:07 +0000)]
Omit unnecessary parens when pretty-printing IfaceExpr
simonpj@microsoft.com [Thu, 25 Feb 2010 17:41:12 +0000 (17:41 +0000)]
Comments only
simonpj@microsoft.com [Thu, 25 Feb 2010 17:40:48 +0000 (17:40 +0000)]
Add comment
simonpj@microsoft.com [Thu, 25 Feb 2010 17:40:28 +0000 (17:40 +0000)]
Change pretty printing of InlinePrag slightly
Ian Lynagh [Sun, 28 Feb 2010 19:18:37 +0000 (19:18 +0000)]
Add -no-auto-link-packages docs to the user guide; fixes trac #3759
Ian Lynagh [Sun, 28 Feb 2010 18:29:45 +0000 (18:29 +0000)]
Whitespace only in docs/users_guide/packages.xml
Ian Lynagh [Sat, 27 Feb 2010 20:56:26 +0000 (20:56 +0000)]
Add a LICENSE file to libraries/bin-package-db
Silences a (harmless) error from tar when making bindists
Ian Lynagh [Sat, 27 Feb 2010 20:25:17 +0000 (20:25 +0000)]
Have separate rules to generate tags and TAGS
This works around the two filenames being the same on case-insensitive
file systems.
Ian Lynagh [Sat, 27 Feb 2010 17:39:51 +0000 (17:39 +0000)]
Fix trac #2578
We define empty datatypes as not being enumerations, which means the
empty blocks aren't generated.
Ian Lynagh [Fri, 26 Feb 2010 22:39:31 +0000 (22:39 +0000)]
Fix the build with GHC < 6.12
Simon Marlow [Fri, 26 Feb 2010 11:12:05 +0000 (11:12 +0000)]
update the docs to reflect changes in the tracing flags
Simon Marlow [Fri, 26 Feb 2010 11:06:08 +0000 (11:06 +0000)]
Tweak the tracing flags slightly, and clean up error handling and diagnostics
Tracing flags are now:
-l[flags] Log events in binary format to the file <program>.eventlog
-v[flags] Log events to stderr
where [flags] can contain:
s scheduler events
t add time stamps (only useful with -v)
and there are more helpful error messages when using flags that are
only available in particular variants of the RTS:
the flag -v requires the program to be built with -debug
the flag -Ds requires the program to be built with -debug
the flag -p requires the program to be built with -prof
the flag -N requires the program to be built with -threaded
the flag -v requires the program to be built with -debug
Also, I fixed the crash reported in #3874, with +RTS -ls -v.
Simon Marlow [Fri, 26 Feb 2010 09:32:15 +0000 (09:32 +0000)]
Fix crash when using printf format specifiers in traceEvent (#3874)
Simon Marlow [Thu, 25 Feb 2010 13:16:16 +0000 (13:16 +0000)]
hack to make the docs build again in a lndir build tree (see comments)
Simon Marlow [Wed, 24 Feb 2010 15:25:19 +0000 (15:25 +0000)]
Force encoding to UTF-8 when writing individual .conf files
Ben.Lippmeier@anu.edu.au [Mon, 22 Feb 2010 07:51:44 +0000 (07:51 +0000)]
Fix build for non-x86 arches again.
Ian Lynagh [Tue, 23 Feb 2010 18:16:44 +0000 (18:16 +0000)]
Fix the link to the ghc docs in libraries/prologue.txt
Ian Lynagh [Tue, 23 Feb 2010 16:45:51 +0000 (16:45 +0000)]
Fix more library links in the user guide