ghc.git
9 years agoDon't do SpecConstr on NOINLINE things (Trac #4064)
simonpj@microsoft.com [Tue, 25 May 2010 11:28:07 +0000 (11:28 +0000)] 
Don't do SpecConstr on NOINLINE things (Trac #4064)

Since the RULE from specialising gets the same Activation as
the inlining for the Id itself there's no point in specialising
a NOINLINE thing, because the rule will be permanently switched
off.

See Note [Transfer activation] in SpecConstr
and Note [Auto-specialisation and RULES] in Specialise.

9 years agoChange our #defines to work on FreeBSD too
Simon Marlow [Mon, 24 May 2010 10:58:28 +0000 (10:58 +0000)] 
Change our #defines to work on FreeBSD too
With glibc, things like _POSIX_C_SOURCE and _ISOC99_SOURCE are
additive, but on FreeBSD they are mutually exclusive.  However, it
turns out we only need to define _POSIX_C_SOURCE and _XOPEN_SOURCE to
get all the C99 stuff we need too, so there's no need for any #ifdefs.

Submitted by: Gabor PALI <pgj@FreeBSD.org>

9 years agoAdd a missing UNTAG_CLOSURE, causing bus errors on Sparc
Simon Marlow [Mon, 24 May 2010 10:55:47 +0000 (10:55 +0000)] 
Add a missing UNTAG_CLOSURE, causing bus errors on Sparc
We just about got away with this on x86 which isn't
alignment-sensitive.  The result of the memory load is compared
against a few different values, but there is a fallback case that
happened to be the right thing when the pointer was tagged.  A good
bug to find, nonetheless.

9 years agoAdd wiki links
Simon Marlow [Thu, 20 May 2010 09:59:53 +0000 (09:59 +0000)] 
Add wiki links

9 years agothe 'stage=0' trick to disable all compiler builds stopped working; fix it
Simon Marlow [Thu, 20 May 2010 10:44:55 +0000 (10:44 +0000)] 
the 'stage=0' trick to disable all compiler builds stopped working; fix it

9 years agoComments and formatting only
benl@ouroborus.net [Mon, 24 May 2010 01:40:21 +0000 (01:40 +0000)] 
Comments and formatting only

9 years agoCore prettyprinter fixes. Patch from Tim Chevalier. Fixes #4085
Ian Lynagh [Sat, 22 May 2010 22:50:48 +0000 (22:50 +0000)] 
Core prettyprinter fixes. Patch from Tim Chevalier. Fixes #4085

9 years agoCorrect install-name for dynamic Darwin rts
pho@cielonegro.org [Sat, 8 May 2010 15:11:55 +0000 (15:11 +0000)] 
Correct install-name for dynamic Darwin rts

9 years agoFix the RTS debug_p build
Ian Lynagh [Sat, 22 May 2010 16:31:27 +0000 (16:31 +0000)] 
Fix the RTS debug_p build

9 years agoUnset $CFLAGS for "GNU non-executable stack" configure test; fixes #3889
Ian Lynagh [Fri, 21 May 2010 16:50:05 +0000 (16:50 +0000)] 
Unset $CFLAGS for "GNU non-executable stack" configure test; fixes #3889
With gcc 4.4 we get
    Error: can't resolve `.note.GNU-stack' {.note.GNU-stack section} - `.Ltext0' {.text section}
when running gcc with the -g flag. To work around this we unset
CFLAGS when running the test.

9 years agoDon't run "set -o igncr" before configuring libffi
Ian Lynagh [Thu, 20 May 2010 16:29:18 +0000 (16:29 +0000)] 
Don't run "set -o igncr" before configuring libffi
It used to make the build work on cygwin, but now it breaks it instead:
    config.status: creating include/Makefile
    gawk: ./confLqjohp/subs.awk:1: BEGIN {\r
    gawk: ./confLqjohp/subs.awk:1: ^ backslash not last character on line
    config.status: error: could not create include/Makefile
    make[2]: *** [libffi/stamp.ffi.configure-shared] Error 1
    make[1]: *** [all] Error 2

9 years agoStop passing -Wl,-macosx_version_min to gcc
Ian Lynagh [Thu, 20 May 2010 15:40:03 +0000 (15:40 +0000)] 
Stop passing -Wl,-macosx_version_min to gcc
Fixes a build failure on OS X 10.6. When linking
    rts/dist/build/libHSrts-ghc6.13.20100519.dylib
we got
    ld: symbol dyld_stub_binding_helper not defined (usually in crt1.o/dylib1.o/bundle1.o)
    collect2: ld returned 1 exit status

9 years agoFix build on FreeBSD; patch from Gabor PALI
Ian Lynagh [Wed, 19 May 2010 14:05:52 +0000 (14:05 +0000)] 
Fix build on FreeBSD; patch from Gabor PALI

9 years agoFix package shadowing order (#4072)
Simon Marlow [Wed, 19 May 2010 10:46:17 +0000 (10:46 +0000)] 
Fix package shadowing order (#4072)

Later packages are supposed to shadow earlier ones in the stack,
unless the ordering is overriden with -package-id flags.
Unfortunately an earlier fix for something else had sorted the list of
packages so that it was in lexicographic order by installedPackageId,
and sadly our test (cabal/shadow) didn't pick this up because the
lexicographic ordering happened to work for the test.  I've now fixed
the test so it tries both orderings.

9 years agoSet more env variables when configuring libffi
Ian Lynagh [Tue, 18 May 2010 18:50:14 +0000 (18:50 +0000)] 
Set more env variables when configuring libffi
We now tell it where to find ld, nm and ar

9 years agoSet the location of ar to be the in-tree ar on Windows
Ian Lynagh [Tue, 18 May 2010 18:15:56 +0000 (18:15 +0000)] 
Set the location of ar to be the in-tree ar on Windows

9 years agoChange another / to </> to avoid building paths containing \/
Ian Lynagh [Tue, 18 May 2010 17:20:15 +0000 (17:20 +0000)] 
Change another / to </> to avoid building paths containing \/
This will hopefully fix #2889.

9 years agoFix #4074 (I hope).
Simon Marlow [Tue, 18 May 2010 11:32:14 +0000 (11:32 +0000)] 
Fix #4074 (I hope).

1. allow multiple threads to call startTimer()/stopTimer() pairs
2. disable the timer around fork() in forkProcess()

A corresponding change to the process package is required.

9 years agowe don't have a gcc-lib in LIB_DIR any more
Simon Marlow [Thu, 1 Apr 2010 10:23:51 +0000 (10:23 +0000)] 
we don't have a gcc-lib in LIB_DIR any more

9 years agoIn validate, use gmake if available; based on a patch from Gabor PALI
Ian Lynagh [Mon, 17 May 2010 20:06:54 +0000 (20:06 +0000)] 
In validate, use gmake if available; based on a patch from Gabor PALI

9 years agoRemove duplicate "./configure --help" output; fixes #4075
Ian Lynagh [Sun, 16 May 2010 14:12:06 +0000 (14:12 +0000)] 
Remove duplicate "./configure --help" output; fixes #4075

9 years agoUpdate various 'sh boot's to 'perl boot'
Ian Lynagh [Sun, 16 May 2010 12:26:09 +0000 (12:26 +0000)] 
Update various 'sh boot's to 'perl boot'
Spotted by Marco TĂșlio Gontijo e Silva

9 years agoadd missing initialisation for eventBufMutex
Simon Marlow [Fri, 14 May 2010 09:49:43 +0000 (09:49 +0000)] 
add missing initialisation for eventBufMutex

9 years agoUndo part of #4003 patch
Simon Marlow [Thu, 13 May 2010 14:20:17 +0000 (14:20 +0000)] 
Undo part of #4003 patch
We still need the workaround for when compiling HEAD with 6.12.2

9 years agoFix makefile loop (#4050)
pho@cielonegro.org [Fri, 7 May 2010 14:07:07 +0000 (14:07 +0000)] 
Fix makefile loop (#4050)

The libtool creates "libffi.dylib" and "libffi.5.dylib" but not "libffi.5.0.9.dylib". Having it in libffi_DYNAMIC_LIBS causes an infinite makefile loop.

9 years agofix !TABLES_NEXT_TO_CODE
Simon Marlow [Mon, 10 May 2010 15:19:34 +0000 (15:19 +0000)] 
fix !TABLES_NEXT_TO_CODE

9 years agolooksLikeModuleName: allow apostrophe in module names (#4051)
Simon Marlow [Mon, 10 May 2010 09:47:41 +0000 (09:47 +0000)] 
looksLikeModuleName: allow apostrophe in module names (#4051)

9 years agoadd the proper library dependencies for GhcProfiled=YES
Simon Marlow [Thu, 6 May 2010 12:21:18 +0000 (12:21 +0000)] 
add the proper library dependencies for GhcProfiled=YES

9 years agoFix Trac #4003: fix the knot-tying in checkHiBootIface
simonpj@microsoft.com [Tue, 11 May 2010 07:50:26 +0000 (07:50 +0000)] 
Fix Trac #4003: fix the knot-tying in checkHiBootIface

I had incorrectly "optimised" checkHiBootIface so that it forgot
to update the "knot-tied" type environment.

This patch fixes the HEAD

9 years agoRe-engineer the derived Ord instance generation code (fix Trac #4019)
simonpj@microsoft.com [Mon, 10 May 2010 13:33:33 +0000 (13:33 +0000)] 
Re-engineer the derived Ord instance generation code (fix Trac #4019)

As well as fixing #4019, I rejigged the way that Ord instances are
generated, which should make them faster in general.  See the
Note [Generating Ord instances].

I tried to measure the performance difference from this change, but
the #4019 fix only removes one conditional branch per iteration, and
I couldn't measure a consistent improvement.  But still, tihs is
better than before.

9 years agoMake arity of INLINE things consistent
simonpj@microsoft.com [Mon, 10 May 2010 13:30:05 +0000 (13:30 +0000)] 
Make arity of INLINE things consistent

We eta-expand things with INLINE pragmas;
see Note [Eta-expanding INLINE things].

But I eta-expanded it the wrong amount when the function
was overloaded.  Ooops.

9 years agoCompacting GC fix, we forgot to thread the new bq field of StgTSO.
Simon Marlow [Mon, 10 May 2010 08:23:25 +0000 (08:23 +0000)] 
Compacting GC fix, we forgot to thread the new bq field of StgTSO.

9 years agoAdd version constraints for the boot packages; fixes trac #3852
Ian Lynagh [Sun, 9 May 2010 17:50:51 +0000 (17:50 +0000)] 
Add version constraints for the boot packages; fixes trac #3852
When using the bootstrapping compiler, we now explicitly constrain
the version of boot packages (Cabal, extensible-exceptions, etc) to the
in-tree version, so that the build system is less fragile should the
user have a newer version installed for the bootstrapping compiler.

9 years agoDon't include inter-package dependencies when compiling with stage 0; #4031
Ian Lynagh [Sun, 9 May 2010 13:05:11 +0000 (13:05 +0000)] 
Don't include inter-package dependencies when compiling with stage 0; #4031
This fixes a problem when building with GHC 6.12 on Windows, where
dependencies on stage 0 (bootstrapping compiler) packages have absolute
paths c:/ghc/..., and make gets confused by the colon.

9 years agoAdd a ghc.mk for bindisttest/
Ian Lynagh [Sat, 8 May 2010 22:39:11 +0000 (22:39 +0000)] 
Add a ghc.mk for bindisttest/

9 years agoMove some make variables around so they are available when cleaning
Ian Lynagh [Sat, 8 May 2010 21:24:05 +0000 (21:24 +0000)] 
Move some make variables around so they are available when cleaning

9 years agoOptimise checkremove a bit
Ian Lynagh [Sat, 8 May 2010 20:20:06 +0000 (20:20 +0000)] 
Optimise checkremove a bit

9 years agoImprove the bindisttest Makefile
Ian Lynagh [Sat, 8 May 2010 19:54:50 +0000 (19:54 +0000)] 
Improve the bindisttest Makefile

9 years agoAdd tools to test that cleaning works properly
Ian Lynagh [Sat, 8 May 2010 19:41:05 +0000 (19:41 +0000)] 
Add tools to test that cleaning works properly

9 years agoTweak the ghc-pkg finding code
Ian Lynagh [Sat, 8 May 2010 12:58:15 +0000 (12:58 +0000)] 
Tweak the ghc-pkg finding code
It now understand the ghc-stage[123] names we use in-tree, and it won't
go looking for any old ghc-pkg if it can't find the one that matches
ghc.

9 years agoAdd a way to show what cleaning would be done, without actually doing it
Ian Lynagh [Sat, 8 May 2010 12:24:38 +0000 (12:24 +0000)] 
Add a way to show what cleaning would be done, without actually doing it

9 years agoTidy up the "rm" flags in the build system
Ian Lynagh [Sat, 8 May 2010 11:57:45 +0000 (11:57 +0000)] 
Tidy up the "rm" flags in the build system

9 years agoFix crash in nested callbacks (#4038)
Simon Marlow [Fri, 7 May 2010 09:32:22 +0000 (09:32 +0000)] 
Fix crash in nested callbacks (#4038)
Broken by "Split part of the Task struct into a separate struct
InCall".

9 years agoAdd $(GhcDynamic) knob, set to YES to get stage2 linked with -dynamic
Simon Marlow [Wed, 28 Apr 2010 20:52:41 +0000 (20:52 +0000)] 
Add $(GhcDynamic) knob, set to YES to get stage2 linked with -dynamic
Default currently NO.

Validate passed with GhcDynamic=YES on x86/Linux here.

The compiler is currently slower on x86 when linked -dynamic,
because the GC inner loop has been adversely affected by -fPIC, I'm
looking into how to fix it.

9 years agoomit "dyn" from the way appended to the __stginit label
Simon Marlow [Wed, 28 Apr 2010 20:49:14 +0000 (20:49 +0000)] 
omit "dyn" from the way appended to the __stginit label
When GHCi is linked dynamically, we still want to be able to load
non-dynamic object files.

9 years agoimprovements to findPtr(), a neat hack for browsing the heap in gdb
Simon Marlow [Thu, 6 May 2010 11:54:27 +0000 (11:54 +0000)] 
improvements to findPtr(), a neat hack for browsing the heap in gdb

9 years agoFix +RTS -G1
Simon Marlow [Thu, 6 May 2010 11:07:39 +0000 (11:07 +0000)] 
Fix +RTS -G1

9 years agoEnable the "redundant specialise pragmas" warning; fixes trac #3855
Ian Lynagh [Thu, 6 May 2010 17:53:51 +0000 (17:53 +0000)] 
Enable the "redundant specialise pragmas" warning; fixes trac #3855

9 years agoFind the correct external ids when there's a wrapper
simonpj@microsoft.com [Thu, 6 May 2010 16:41:35 +0000 (16:41 +0000)] 
Find the correct external ids when there's a wrapper

We were failing to externalise the wrapper id for a function
that had one.

9 years agoAdd a comment about pattern coercions
simonpj@microsoft.com [Thu, 6 May 2010 16:40:27 +0000 (16:40 +0000)] 
Add a comment about pattern coercions

9 years agoComments only
simonpj@microsoft.com [Thu, 6 May 2010 16:38:29 +0000 (16:38 +0000)] 
Comments only

9 years agoMake a missing name in mkUsageInfo into a panic
simonpj@microsoft.com [Thu, 6 May 2010 16:38:13 +0000 (16:38 +0000)] 
Make a missing name in mkUsageInfo into a panic

We really want to know about this!

9 years agoRefactoring of hsXxxBinders
simonpj@microsoft.com [Thu, 6 May 2010 16:37:37 +0000 (16:37 +0000)] 
Refactoring of hsXxxBinders

This patch moves various functions that extract the binders
from a HsTyClDecl, HsForeignDecl etc into HsUtils, and gives
them consistent names.

9 years agoFix Trac #3966: warn about useless UNPACK pragmas
simonpj@microsoft.com [Thu, 6 May 2010 16:33:37 +0000 (16:33 +0000)] 
Fix Trac #3966: warn about useless UNPACK pragmas

Warning about useless UNPACK pragmas wasn't as easy as I thought.
I did quite a bit of refactoring, which improved the code by refining
the types somewhat.  In particular notice that in DataCon, we have

    dcStrictMarks   :: [HsBang]
    dcRepStrictness :: [StrictnessMarks]

The former relates to the *source-code* annotation, the latter to
GHC's representation choice.

9 years agoMake tcg_dus behave more sanely; fixes a mkUsageInfo panic
simonpj@microsoft.com [Thu, 6 May 2010 16:27:19 +0000 (16:27 +0000)] 
Make tcg_dus behave more sanely; fixes a mkUsageInfo panic

The tcg_dus field used to contain *uses* of type and class decls,
but not *defs*.  That was inconsistent, and it really went wrong
for Template Haskell bracket.  What happened was that
 foo = [d| data A = A
           f :: A -> A
           f x = x |]
would find a "use" of A when processing the top level of the module,
which in turn led to a mkUsageInfo panic in MkIface.  The cause was
the fact that the tcg_dus for the nested quote didn't have defs for
A.

9 years agoAdd a HsExplicitFlag to SpliceDecl, to improve Trac #4042
simonpj@microsoft.com [Thu, 6 May 2010 16:15:23 +0000 (16:15 +0000)] 
Add a HsExplicitFlag to SpliceDecl, to improve Trac #4042

The issue here is that

    g :: A -> A
    f
    data A = A

is treated as if you'd written $(f); that is the call of
f is a top-level Template Haskell splice.  This patch
makes sure that we *first* check the -XTemplateHaskellFlag
and bleat about a parse error if it's off.  Othewise we
get strange seeing "A is out of scope" errors.

9 years agoChange an assert to a warn
simonpj@microsoft.com [Thu, 6 May 2010 16:11:11 +0000 (16:11 +0000)] 
Change an assert to a warn

This is in the constraint simplifier which I'm about
to rewrite, so I'm hoping the assert isn't fatal!

9 years agoTidy up debug print a little
simonpj@microsoft.com [Thu, 6 May 2010 16:10:27 +0000 (16:10 +0000)] 
Tidy up debug print a little

9 years agoRemove useless UNPACK pragmas
simonpj@microsoft.com [Thu, 6 May 2010 16:10:12 +0000 (16:10 +0000)] 
Remove useless UNPACK pragmas

9 years agoAdd WARNM2 macro, plus some refactoring
simonpj@microsoft.com [Thu, 6 May 2010 16:08:08 +0000 (16:08 +0000)] 
Add WARNM2 macro, plus some refactoring

9 years agoUse -Wwarn for the binary package, becuase it has redundant UNPACK pragmas
simonpj@microsoft.com [Thu, 6 May 2010 16:07:50 +0000 (16:07 +0000)] 
Use -Wwarn for the binary package, becuase it has redundant UNPACK pragmas

9 years agoFix Trac #3966: warn about unused UNPACK pragmas
simonpj@microsoft.com [Fri, 9 Apr 2010 20:18:12 +0000 (20:18 +0000)] 
Fix Trac #3966: warn about unused UNPACK pragmas

9 years agoFix Trac #3953: fail earlier when using a bogus quasiquoter
simonpj@microsoft.com [Fri, 9 Apr 2010 20:17:48 +0000 (20:17 +0000)] 
Fix Trac #3953: fail earlier when using a bogus quasiquoter

9 years agoFix Trac #3965: tighten conditions when deriving Data
simonpj@microsoft.com [Fri, 9 Apr 2010 18:44:20 +0000 (18:44 +0000)] 
Fix Trac #3965: tighten conditions when deriving Data

It's tricky to set up the context for a Data instance.  I got it wrong
once, and fixed it -- hence the "extra_constraints" in
TcDeriv.inferConstraints.

But it still wasn't right!  The tricky bit is that dataCast1 is only
generated when T :: *->*, and dataCast2 when T :: *->*->*. (See
the code in TcGenDeriv for dataCastX.

9 years agoFix Trac #3964: view patterns in DsArrows
simonpj@microsoft.com [Fri, 9 Apr 2010 16:55:57 +0000 (16:55 +0000)] 
Fix Trac #3964: view patterns in DsArrows

Just a missing case; I've eliminated the catch-all so
that we get a warning next time we extend HsPat

9 years agoFix Trac #3955: renamer and type variables
simonpj@microsoft.com [Fri, 9 Apr 2010 16:37:10 +0000 (16:37 +0000)] 
Fix Trac #3955: renamer and type variables

The renamer wasn't computing the free variables of a type declaration
properly.  This patch refactors a bit, and makes it more robust,
fixing #3955 and several other closely-related bugs.  (We were
omitting some free variables and that could just possibly lead to a
usage-version tracking error.

9 years agoLayout only
simonpj@microsoft.com [Fri, 9 Apr 2010 16:35:06 +0000 (16:35 +0000)] 
Layout only

9 years agoGive a better deprecated message for INCLUDE pragmas; fixes #3933
Ian Lynagh [Thu, 6 May 2010 13:09:10 +0000 (13:09 +0000)] 
Give a better deprecated message for INCLUDE pragmas; fixes #3933
We now have a DeprecatedFullText constructor, so we can override the
"-#include is deprecated: " part of the warning.

9 years agoDe-haddock a comment that confuses haddock
Ian Lynagh [Thu, 6 May 2010 12:36:07 +0000 (12:36 +0000)] 
De-haddock a comment that confuses haddock

9 years agoFix comment to not confuse haddock
Ian Lynagh [Thu, 6 May 2010 11:36:42 +0000 (11:36 +0000)] 
Fix comment to not confuse haddock

9 years agoDetect EOF when trying to parse a string in hp2ps
Ian Lynagh [Thu, 6 May 2010 00:08:30 +0000 (00:08 +0000)] 
Detect EOF when trying to parse a string in hp2ps

9 years agoMake the demand analyser sdd demands for strict constructors
simonpj@microsoft.com [Wed, 5 May 2010 20:09:36 +0000 (20:09 +0000)] 
Make the demand analyser sdd demands for strict constructors

This opportunity was spotted by Roman, and is documented in
Note [Add demands for strict constructors] in DmdAnal.

9 years agoFix interaction of exprIsCheap and the lone-variable inlining check
simonpj@microsoft.com [Wed, 5 May 2010 20:07:23 +0000 (20:07 +0000)] 
Fix interaction of exprIsCheap and the lone-variable inlining check

See Note [Interaction of exprIsCheap and lone variables] in CoreUnfold

This buglet meant that a nullary definition with an INLINE pragma
counter-intuitively didn't get inlined at all.  Roman identified
the bug.

9 years agoMatching cases in SpecConstr and Rules
simonpj@microsoft.com [Wed, 5 May 2010 20:05:43 +0000 (20:05 +0000)] 
Matching cases in SpecConstr and Rules

This patch has zero effect.  It includes comments,
a bit of refactoring, and a tiny bit of commment-out
code go implement the "matching cases" idea below.

In the end I've left it disabled because while I think
it does no harm I don't think it'll do any good either.
But I didn't want to lose the idea totally. There's
a thread called "Storable and constant memory" on
the libraries@haskell.org list (Apr 2010) about it.

Note [Matching cases]
~~~~~~~~~~~~~~~~~~~~~
{- NOTE: This idea is currently disabled.  It really only works if
         the primops involved are OkForSpeculation, and, since
 they have side effects readIntOfAddr and touch are not.
 Maybe we'll get back to this later .  -}

Consider
   f (case readIntOffAddr# p# i# realWorld# of { (# s#, n# #) ->
      case touch# fp s# of { _ ->
      I# n# } } )
This happened in a tight loop generated by stream fusion that
Roman encountered.  We'd like to treat this just like the let
case, because the primops concerned are ok-for-speculation.
That is, we'd like to behave as if it had been
   case readIntOffAddr# p# i# realWorld# of { (# s#, n# #) ->
   case touch# fp s# of { _ ->
   f (I# n# } } )

9 years agoComments only
simonpj@microsoft.com [Tue, 4 May 2010 16:36:29 +0000 (16:36 +0000)] 
Comments only

9 years agoComments only
simonpj@microsoft.com [Tue, 4 May 2010 16:35:29 +0000 (16:35 +0000)] 
Comments only

9 years agoComments only
simonpj@microsoft.com [Tue, 4 May 2010 16:34:57 +0000 (16:34 +0000)] 
Comments only

9 years agoComments only (about type families)
simonpj@microsoft.com [Sat, 17 Apr 2010 14:50:32 +0000 (14:50 +0000)] 
Comments only (about type families)

9 years agoFix hp2ps when the .hp file has large string literals
Ian Lynagh [Wed, 5 May 2010 19:19:21 +0000 (19:19 +0000)] 
Fix hp2ps when the .hp file has large string literals

9 years agoIn build system, call package-config after including package data
Ian Lynagh [Tue, 4 May 2010 22:50:35 +0000 (22:50 +0000)] 
In build system, call package-config after including package data
Otherwise the $1_$2_HC_OPTS variable gets clobbered.

9 years agorunghc: flush stdout/stderr on an exception (#3890)
Simon Marlow [Wed, 5 May 2010 13:38:48 +0000 (13:38 +0000)] 
runghc: flush stdout/stderr on an exception (#3890)

9 years agoRemove the Unicode alternative for ".." (#3894)
Simon Marlow [Wed, 5 May 2010 12:12:02 +0000 (12:12 +0000)] 
Remove the Unicode alternative for ".." (#3894)

9 years agotidyup; no functional changes
Simon Marlow [Wed, 5 May 2010 11:50:15 +0000 (11:50 +0000)] 
tidyup; no functional changes

9 years agoMake the running_finalizers flag task-local
Simon Marlow [Wed, 5 May 2010 11:49:47 +0000 (11:49 +0000)] 
Make the running_finalizers flag task-local
Fixes a bug reported by Lennart Augustsson, whereby we could get an
incorrect error from the RTS about re-entry from a finalizer,

9 years agoadd a MAYBE_GC() in killThread#, fixes throwto003(threaded2) looping
Simon Marlow [Wed, 5 May 2010 11:47:46 +0000 (11:47 +0000)] 
add a MAYBE_GC() in killThread#, fixes throwto003(threaded2) looping

9 years agoAllow filepath-1.2.*
Simon Marlow [Wed, 5 May 2010 10:11:39 +0000 (10:11 +0000)] 
Allow filepath-1.2.*

9 years agoBlockedOnMsgThrowTo is possible in resurrectThreads (#4030)
Simon Marlow [Wed, 5 May 2010 09:45:34 +0000 (09:45 +0000)] 
BlockedOnMsgThrowTo is possible in resurrectThreads (#4030)

9 years agoDon't raise a throwTo when the target is masking and BlockedOnBlackHole
Simon Marlow [Wed, 5 May 2010 09:45:06 +0000 (09:45 +0000)] 
Don't raise a throwTo when the target is masking and BlockedOnBlackHole

9 years agoFix build with GHC 6.10
Ian Lynagh [Tue, 4 May 2010 18:03:02 +0000 (18:03 +0000)] 
Fix build with GHC 6.10
In GHC 6.10, intersectionWith is (a -> b -> a) instead of (a -> b -> c),
so we need to jump through some hoops to get the more general type.

9 years agoThe libffi patches are no longer needed
Ian Lynagh [Tue, 4 May 2010 17:16:03 +0000 (17:16 +0000)] 
The libffi patches are no longer needed

9 years agoUse the in-tree windres; fixes trac #4032
Ian Lynagh [Tue, 4 May 2010 17:09:41 +0000 (17:09 +0000)] 
Use the in-tree windres; fixes trac #4032

9 years agoPrint unfoldings on lambda-bound variables
Simon PJ [Mon, 3 May 2010 18:18:22 +0000 (18:18 +0000)] 
Print unfoldings on lambda-bound variables

...in the unusual case where they have one;
see Note [Case binders and join points] in Simplify.lhs

9 years agoReplace FiniteMap and UniqFM with counterparts from containers.
Milan Straka [Mon, 3 May 2010 17:13:15 +0000 (17:13 +0000)] 
Replace FiniteMap and UniqFM with counterparts from containers.

The original interfaces are kept. There is small performance improvement:
- when compiling for five nofib, we get following speedups:
    Average                -----           -2.5%
    Average                -----           -0.6%
    Average                -----           -0.5%
    Average                -----           -5.5%
    Average                -----          -10.3%
- when compiling HPC ten times, we get:
    switches                          oldmaps   newmaps
    -O -fasm                          117.402s  116.081s (98.87%)
    -O -fasm -fregs-graph             119.993s  118.735s (98.95%)
    -O -fasm -fregs-iterative         120.191s  118.607s (98.68%)

9 years agoMake the demand analyser take account of lambda-bound unfoldings
Simon PJ [Mon, 3 May 2010 15:16:30 +0000 (15:16 +0000)] 
Make the demand analyser take account of lambda-bound unfoldings

This is a long-standing lurking bug. See Note [Lamba-bound unfoldings]
in DmdAnal.

I'm still not really happy with this lambda-bound-unfolding stuff.

9 years agoFix dynamic libs on OS X, and enable them by default
Ian Lynagh [Mon, 3 May 2010 15:03:02 +0000 (15:03 +0000)] 
Fix dynamic libs on OS X, and enable them by default

9 years agoSwitch back to using bytestring from the darcs repo; partially fixes #3855
Ian Lynagh [Sun, 2 May 2010 11:34:58 +0000 (11:34 +0000)] 
Switch back to using bytestring from the darcs repo; partially fixes #3855

9 years agoFix some cpp warnings when building on FreeBSD; patch from Gabor PALI
Ian Lynagh [Wed, 28 Apr 2010 15:07:00 +0000 (15:07 +0000)] 
Fix some cpp warnings when building on FreeBSD; patch from Gabor PALI

9 years agoFix "make 2"
Ian Lynagh [Tue, 27 Apr 2010 16:22:12 +0000 (16:22 +0000)] 
Fix "make 2"
The new Makefile logic was enabling the stage 1 rules when stage=2,
so "make 2" was rebuilding stage 1.

9 years agoInplace programs depend on their shell wrappers
Ian Lynagh [Tue, 27 Apr 2010 16:00:38 +0000 (16:00 +0000)] 
Inplace programs depend on their shell wrappers

9 years ago--make is now the default (#3515), and -fno-code works with --make (#3783)
Simon Marlow [Tue, 27 Apr 2010 12:28:51 +0000 (12:28 +0000)] 
--make is now the default (#3515), and -fno-code works with --make (#3783)
If the command line contains any Haskell source files, then we behave
as if --make had been given.

The meaning of the -c flag has changed (back): -c now selects one-shot
compilation, but stops before linking.  However, to retain backwards
compatibility, -c is still allowed with --make, and means the same as
--make -no-link.  The -no-link flag has been un-deprecated.

-fno-code is now allowed with --make (#3783); the fact that it was
disabled before was largely accidental, it seems.  We also had some
regressions in this area: it seems that -fno-code was causing a .hc
file to be emitted in certain cases.  I've tidied up the code, there
was no need for -fno-code to be a "mode" flag, as far as I can tell.

-fno-code does not emit interface files, nor does it do recompilation
checking, as suggested in #3783.  This would make Haddock emit
interface files, for example, and I'm fairly sure we don't want to do
that.  Compiling with -fno-code is pretty quick anyway, perhaps we can
get away without recompilation checking.