ghc.git
9 years agoDocument GADTSyntax extension
Ian Lynagh [Sat, 18 Dec 2010 15:01:21 +0000 (15:01 +0000)] 
Document GADTSyntax extension

9 years agoImplement GADTSyntax extension
Ian Lynagh [Sat, 18 Dec 2010 14:45:50 +0000 (14:45 +0000)] 
Implement GADTSyntax extension

9 years agoWhitespace-only in rts/Linker.c
Ian Lynagh [Fri, 17 Dec 2010 23:41:24 +0000 (23:41 +0000)] 
Whitespace-only in rts/Linker.c

9 years agoAdd some casts to fix warnings; patch from Greg Wright
Ian Lynagh [Fri, 17 Dec 2010 22:38:11 +0000 (22:38 +0000)] 
Add some casts to fix warnings; patch from Greg Wright

9 years agoPut an up-to-date Makefile in docs/Makefile
Ian Lynagh [Fri, 17 Dec 2010 22:37:07 +0000 (22:37 +0000)] 
Put an up-to-date Makefile in docs/Makefile
It doesn't do anything useful yet, but it works with the new build system

9 years agodo not compile part of shared lib RTS with -fno-PIC on Solaris
Karel Gardas [Fri, 17 Dec 2010 08:51:33 +0000 (08:51 +0000)] 
do not compile part of shared lib RTS with -fno-PIC on Solaris

9 years agoprovide shared libraries support on i386-unknown-solaris2 platform
Karel Gardas [Fri, 17 Dec 2010 08:46:17 +0000 (08:46 +0000)] 
provide shared libraries support on i386-unknown-solaris2 platform

9 years agofix CPP detection of Solaris in NCG
Karel Gardas [Fri, 17 Dec 2010 08:45:10 +0000 (08:45 +0000)] 
fix CPP detection of Solaris in NCG

9 years agoFix checkBinaries on OS X
Ian Lynagh [Thu, 16 Dec 2010 20:11:21 +0000 (20:11 +0000)] 
Fix checkBinaries on OS X

9 years agoRemove redundant HpcMap and HpcSet wrappers around Data.{Map,Set}
Ian Lynagh [Thu, 16 Dec 2010 19:06:05 +0000 (19:06 +0000)] 
Remove redundant HpcMap and HpcSet wrappers around Data.{Map,Set}

9 years agoUse "-perm -u+x" rather than "-executable" to find executables
Ian Lynagh [Thu, 16 Dec 2010 14:52:35 +0000 (14:52 +0000)] 
Use "-perm -u+x" rather than "-executable" to find executables
On Windows, -executable is matching the html docs.

9 years agoRemove a debugging print
Ian Lynagh [Thu, 16 Dec 2010 01:14:59 +0000 (01:14 +0000)] 
Remove a debugging print

9 years ago__GLASGOW_HASKELL__ >= 604 is now always true
Ian Lynagh [Wed, 15 Dec 2010 21:46:56 +0000 (21:46 +0000)] 
__GLASGOW_HASKELL__ >= 604 is now always true

9 years agoRemove more dead code now we require GHC >= 6.12
Ian Lynagh [Wed, 15 Dec 2010 21:37:15 +0000 (21:37 +0000)] 
Remove more dead code now we require GHC >= 6.12

9 years agorefactor and tidy up the section on RTS options
Simon Marlow [Thu, 16 Dec 2010 12:31:51 +0000 (12:31 +0000)] 
refactor and tidy up the section on RTS options

9 years agoRelated to #4826: Some minor tweaks to the wording of the User Guide, section 4.16
Orphi [Thu, 9 Dec 2010 17:04:40 +0000 (17:04 +0000)] 
Related to #4826: Some minor tweaks to the wording of the User Guide, section 4.16

9 years agoFIX #4826 partial: Add -rtsopts and -with-rtsopts to User Guide section 4.11.6
Orphi [Thu, 9 Dec 2010 16:51:52 +0000 (16:51 +0000)] 
FIX #4826 partial: Add -rtsopts and -with-rtsopts to User Guide section 4.11.6

9 years agoFIX #4826 partially: Change -f to -? in User Guide section F4.16
Orphi [Thu, 9 Dec 2010 14:41:48 +0000 (14:41 +0000)] 
FIX #4826 partially: Change -f to -? in User Guide section F4.16

9 years agofix #3910
Simon Marlow [Thu, 16 Dec 2010 11:44:52 +0000 (11:44 +0000)] 
fix #3910

9 years agoremove an optimisation that wasn't
Simon Marlow [Wed, 15 Dec 2010 15:26:56 +0000 (15:26 +0000)] 
remove an optimisation that wasn't

9 years agofix a warning
Simon Marlow [Thu, 16 Dec 2010 10:57:23 +0000 (10:57 +0000)] 
fix a warning

9 years agouse EXTERN_INLINE instead of STATIC_INLINE to avoid some gcc warnings
Simon Marlow [Thu, 16 Dec 2010 10:57:09 +0000 (10:57 +0000)] 
use EXTERN_INLINE instead of STATIC_INLINE to avoid some gcc warnings

9 years agoremove dead code
Simon Marlow [Thu, 16 Dec 2010 10:49:44 +0000 (10:49 +0000)] 
remove dead code

9 years agofix retainer profiling: add missing case for TSO
Simon Marlow [Thu, 16 Dec 2010 10:39:00 +0000 (10:39 +0000)] 
fix retainer profiling: add missing case for TSO

9 years agoadd a missing STACK case
Simon Marlow [Thu, 16 Dec 2010 10:21:00 +0000 (10:21 +0000)] 
add a missing STACK case

9 years agoRemove code that is dead now that we need >= 6.12 to build
Ian Lynagh [Wed, 15 Dec 2010 20:10:06 +0000 (20:10 +0000)] 
Remove code that is dead now that we need >= 6.12 to build

9 years agofix for large stack allocations
Simon Marlow [Wed, 15 Dec 2010 15:24:19 +0000 (15:24 +0000)] 
fix for large stack allocations

9 years agoImplement stack chunks and separate TSO/STACK objects
Simon Marlow [Wed, 15 Dec 2010 12:08:43 +0000 (12:08 +0000)] 
Implement stack chunks and separate TSO/STACK objects

This patch makes two changes to the way stacks are managed:

1. The stack is now stored in a separate object from the TSO.

This means that it is easier to replace the stack object for a thread
when the stack overflows or underflows; we don't have to leave behind
the old TSO as an indirection any more.  Consequently, we can remove
ThreadRelocated and deRefTSO(), which were a pain.

This is obviously the right thing, but the last time I tried to do it
it made performance worse.  This time I seem to have cracked it.

2. Stacks are now represented as a chain of chunks, rather than
   a single monolithic object.

The big advantage here is that individual chunks are marked clean or
dirty according to whether they contain pointers to the young
generation, and the GC can avoid traversing clean stack chunks during
a young-generation collection.  This means that programs with deep
stacks will see a big saving in GC overhead when using the default GC
settings.

A secondary advantage is that there is much less copying involved as
the stack grows.  Programs that quickly grow a deep stack will see big
improvements.

In some ways the implementation is simpler, as nothing special needs
to be done to reclaim stack as the stack shrinks (the GC just recovers
the dead stack chunks).  On the other hand, we have to manage stack
underflow between chunks, so there's a new stack frame
(UNDERFLOW_FRAME), and we now have separate TSO and STACK objects.
The total amount of code is probably about the same as before.

There are new RTS flags:

   -ki<size> Sets the initial thread stack size (default 1k)  Egs: -ki4k -ki2m
   -kc<size> Sets the stack chunk size (default 32k)
   -kb<size> Sets the stack chunk buffer size (default 1k)

-ki was previously called just -k, and the old name is still accepted
for backwards compatibility.  These new options are documented.

9 years agocomments on SRC_HC_OPTS (#4829)
Simon Marlow [Tue, 14 Dec 2010 10:13:40 +0000 (10:13 +0000)] 
comments on SRC_HC_OPTS (#4829)

9 years agofix another sanity error, and refactor/tidy up
Simon Marlow [Thu, 9 Dec 2010 16:39:19 +0000 (16:39 +0000)] 
fix another sanity error, and refactor/tidy up

9 years agoFix a bug in functorLikeTraverse, which was giving wrong answer for tuples
simonpj@microsoft.com [Wed, 15 Dec 2010 12:37:25 +0000 (12:37 +0000)] 
Fix a bug in functorLikeTraverse, which was giving wrong answer for tuples

This bug led to Trac #4816, which is hereby fixed

9 years agoImprove printing for -ddump-deriv
simonpj@microsoft.com [Wed, 15 Dec 2010 12:19:55 +0000 (12:19 +0000)] 
Improve printing for -ddump-deriv

9 years agoTighten up what it means to be an "enumeration data constructor"
simonpj@microsoft.com [Wed, 15 Dec 2010 12:19:27 +0000 (12:19 +0000)] 
Tighten up what it means to be an "enumeration data constructor"

See Note [Enumeration types] in TyCon, and comments in Trac #4528

9 years agoAllow enumerations to have phantom arguments.
simonpj@microsoft.com [Wed, 15 Dec 2010 12:18:17 +0000 (12:18 +0000)] 
Allow enumerations to have phantom arguments.

The bytecode generator was being too eager.
Fixes Trac #4528, or rather, a near variant.

9 years agoInstance declaration overlap allowed if *either* has -XOverlappingInstances
simonpj@microsoft.com [Tue, 14 Dec 2010 18:05:00 +0000 (18:05 +0000)] 
Instance declaration overlap allowed if *either* has -XOverlappingInstances

This satisfies Trac #3877.  Documentation is changed too.
I'm not sure if this should go in 7.0.2.

9 years agoFix Trac #4841: behave right with TypeSynonymInstances and NoFlexibleInstances
simonpj@microsoft.com [Tue, 14 Dec 2010 17:47:55 +0000 (17:47 +0000)] 
Fix Trac #4841: behave right with TypeSynonymInstances and NoFlexibleInstances

When we have TypeSynonymInstances without FlexibleInstances we should still
insist on a H98-style instance head, after looking through the synonym.

This patch also make FlexibleInstances imply TypeSynonymInstances.  Anything
else is a bit awkward, and not very useful.

9 years agoFix Trac #3731: more superclass subtlety (sigh)
simonpj@microsoft.com [Tue, 14 Dec 2010 18:03:44 +0000 (18:03 +0000)] 
Fix Trac #3731: more superclass subtlety (sigh)

I will add more comments, but I want to commit this tonight,
so the overnight builds get it.

9 years agoLess verbose debug print
simonpj@microsoft.com [Tue, 14 Dec 2010 18:02:48 +0000 (18:02 +0000)] 
Less verbose debug print

9 years agoWibble to InstEnv.instanceHead
simonpj@microsoft.com [Tue, 14 Dec 2010 08:29:39 +0000 (08:29 +0000)] 
Wibble to InstEnv.instanceHead

Fixes an accidental glitch in T1835

9 years agoRemove dead code now that we require the bootstrapping compiler be >= 6.12
Ian Lynagh [Tue, 14 Dec 2010 01:10:11 +0000 (01:10 +0000)] 
Remove dead code now that we require the bootstrapping compiler be >= 6.12

9 years agoGHC 6.12 is now needed to build the HEAD
Ian Lynagh [Tue, 14 Dec 2010 01:09:23 +0000 (01:09 +0000)] 
GHC 6.12 is now needed to build the HEAD

9 years agoAdd libstdc++-4.5.0-1-mingw32-dll-6.tar.lzma to mingw tarballs
Ian Lynagh [Mon, 13 Dec 2010 22:31:53 +0000 (22:31 +0000)] 
Add libstdc++-4.5.0-1-mingw32-dll-6.tar.lzma to mingw tarballs

9 years agoFix recursive superclasses (again). Fixes Trac #4809.
simonpj@microsoft.com [Mon, 13 Dec 2010 17:15:11 +0000 (17:15 +0000)] 
Fix recursive superclasses (again).  Fixes Trac #4809.

This patch finally deals with the super-delicate question of
superclases in possibly-recursive dictionaries.  The key idea
is the DFun Superclass Invariant (see TcInstDcls):

     In the body of a DFun, every superclass argument to the
     returned dictionary is
       either   * one of the arguments of the DFun,
       or       * constant, bound at top level

To establish the invariant, we add new "silent" superclass
argument(s) to each dfun, so that the dfun does not do superclass
selection internally.  There's a bit of hoo-ha to make sure that
we don't print those silent arguments in error messages; a knock
on effect was a change in interface-file format.

A second change is that instead of the complex and fragile
"self dictionary binding" in TcInstDcls and TcClassDcl,
using the same mechanism for existential pattern bindings.
See Note [Subtle interaction of recursion and overlap] in TcInstDcls
and Note [Binding when looking up instances] in InstEnv.

Main notes are here:

  * Note [Silent Superclass Arguments] in TcInstDcls,
    including the DFun Superclass Invariant

Main code changes are:

  * The code for MkId.mkDictFunId and mkDictFunTy

  * DFunUnfoldings get a little more complicated;
    their arguments are a new type DFunArg (in CoreSyn)

  * No "self" argument in tcInstanceMethod
  * No special tcSimplifySuperClasss
  * No "dependents" argument to EvDFunApp

IMPORTANT
   It turns out that it's quite tricky to generate the right
   DFunUnfolding for a specialised dfun, when you use SPECIALISE
   INSTANCE.  For now I've just commented it out (in DsBinds) but
   that'll lose some optimisation, and I need to get back to
   this.

9 years agoDoing the smart canonicalization only if we are not simplifying a Rule LHS.
dimitris@microsoft.com [Fri, 10 Dec 2010 13:22:21 +0000 (13:22 +0000)] 
Doing the smart canonicalization only if we are not simplifying a Rule LHS.
Also, same thing now applies for adding superclasses.

9 years agoMoved canonicalisation inside solveInteract
dimitris@microsoft.com [Thu, 9 Dec 2010 14:12:15 +0000 (14:12 +0000)] 
Moved canonicalisation inside solveInteract

Moreover canonicalisation now is "clever", i.e. it never canonicalizes a class
constraint if it can already discharge it from some other inert or previously
encountered constraints. See Note [Avoiding the superclass explosion]

9 years agoGHCi linker: Assume non-Haskell libraries are dynamic libs
Ian Lynagh [Mon, 13 Dec 2010 12:49:30 +0000 (12:49 +0000)] 
GHCi linker: Assume non-Haskell libraries are dynamic libs
This works around a segfault we get when trying to load libiconv.a on
some platforms.

9 years agoAdd --version support to ghc-cabal
Ian Lynagh [Sun, 12 Dec 2010 21:36:00 +0000 (21:36 +0000)] 
Add --version support to ghc-cabal

9 years agoDon't link the GHC RTS into our C-only programs
Ian Lynagh [Fri, 10 Dec 2010 18:54:02 +0000 (18:54 +0000)] 
Don't link the GHC RTS into our C-only programs

9 years agoBuild a copy of ghc-cabal with the in-tree compiler, for the bindist
Ian Lynagh [Fri, 10 Dec 2010 18:11:23 +0000 (18:11 +0000)] 
Build a copy of ghc-cabal with the in-tree compiler, for the bindist

9 years agoAdd a test that all programs in the bindist were built with the right GHC
Ian Lynagh [Fri, 10 Dec 2010 16:12:18 +0000 (16:12 +0000)] 
Add a test that all programs in the bindist were built with the right GHC
They should use the GHC from the build tree, not the bootstrapping compiler.

9 years agoFix Trac #4534: renamer bug
simonpj@microsoft.com [Fri, 10 Dec 2010 08:45:30 +0000 (08:45 +0000)] 
Fix Trac #4534: renamer bug

The renamer wasn't attaching the right used-variables to a
TransformStmt constructor.

The real modification is in RnExpr; the rest is just
pretty-printing and white space.

9 years agoWhite space only
simonpj@microsoft.com [Fri, 10 Dec 2010 08:42:55 +0000 (08:42 +0000)] 
White space only

9 years agoComments only
simonpj@microsoft.com [Fri, 10 Dec 2010 08:41:16 +0000 (08:41 +0000)] 
Comments only

9 years agoMake the case-to-let transformation a little less eager
simonpj@microsoft.com [Wed, 8 Dec 2010 17:22:51 +0000 (17:22 +0000)] 
Make the case-to-let transformation a little less eager

See Note [Case elimination: lifted case].
Thanks to Roman for identifying this case.

9 years agowarning fix: don't redefine BLOCKS_PER_MBLOCK
Simon Marlow [Fri, 10 Dec 2010 09:40:02 +0000 (09:40 +0000)] 
warning fix: don't redefine BLOCKS_PER_MBLOCK

9 years agoOnly reset the event log if logging is turned on (addendum to #4512)
Simon Marlow [Fri, 10 Dec 2010 09:39:51 +0000 (09:39 +0000)] 
Only reset the event log if logging is turned on (addendum to #4512)

9 years agoallocate enough room for the longer filename (addendum to #4512)
Simon Marlow [Fri, 10 Dec 2010 09:39:06 +0000 (09:39 +0000)] 
allocate enough room for the longer filename (addendum to #4512)

9 years agoFix Windows build: move rtsTimerSignal to the POSIX-only section
Simon Marlow [Fri, 10 Dec 2010 09:00:45 +0000 (09:00 +0000)] 
Fix Windows build: move rtsTimerSignal to the POSIX-only section

9 years agoDefault the value of -dppr-cols when the static flags aren't initialised yet
Ben Lippmeier [Fri, 10 Dec 2010 06:01:54 +0000 (06:01 +0000)] 
Default the value of -dppr-cols when the static flags aren't initialised yet
If GHC's command line options are bad then the options parser uses the
pretty printer before the -dppr-cols flag has been read.

9 years agoDefensify naked read in LLVM mangler
Ben Lippmeier [Fri, 10 Dec 2010 04:59:22 +0000 (04:59 +0000)] 
Defensify naked read in LLVM mangler

9 years agoFormatting only
Ben Lippmeier [Fri, 10 Dec 2010 04:26:00 +0000 (04:26 +0000)] 
Formatting only

9 years agoAlways ppr case alts on separate lines
Ben Lippmeier [Wed, 8 Dec 2010 07:05:08 +0000 (07:05 +0000)] 
Always ppr case alts on separate lines

9 years agoAdd -dppr-colsN to set width of dumps
Ben Lippmeier [Wed, 8 Dec 2010 07:02:45 +0000 (07:02 +0000)] 
Add -dppr-colsN to set width of dumps

9 years agoAdd -dppr-case-as-let to print "strict lets" as actual lets
Ben Lippmeier [Wed, 8 Dec 2010 06:55:48 +0000 (06:55 +0000)] 
Add -dppr-case-as-let to print "strict lets" as actual lets

9 years agoSuppress more info with -dsuppress-idinfo
Ben Lippmeier [Wed, 8 Dec 2010 06:30:37 +0000 (06:30 +0000)] 
Suppress more info with -dsuppress-idinfo

9 years agoImplement -dsuppress-type-signatures
Ben Lippmeier [Wed, 8 Dec 2010 06:28:14 +0000 (06:28 +0000)] 
Implement -dsuppress-type-signatures

9 years agoAdd more suppression flags
Ben Lippmeier [Wed, 8 Dec 2010 02:07:23 +0000 (02:07 +0000)] 
Add more suppression flags
 -dsuppress-all
 -dsuppress-type-applications
 -dsuppress-idinfo

9 years agofix ticket number (#4505)
Simon Marlow [Thu, 9 Dec 2010 12:04:04 +0000 (12:04 +0000)] 
fix ticket number (#4505)

9 years agofix warnings
Simon Marlow [Thu, 9 Dec 2010 11:58:44 +0000 (11:58 +0000)] 
fix warnings

9 years agoCatch too-large allocations and emit an error message (#4505)
Simon Marlow [Thu, 9 Dec 2010 11:40:05 +0000 (11:40 +0000)] 
Catch too-large allocations and emit an error message (#4505)

This is a temporary measure until we fix the bug properly (which is
somewhat tricky, and we think might be easier in the new code
generator).

For now we get:

ghc-stage2: sorry! (unimplemented feature or known bug)
  (GHC version 7.1 for i386-unknown-linux):
        Trying to allocate more than 1040384 bytes.

See: http://hackage.haskell.org/trac/ghc/ticket/4550
Suggestion: read data from a file instead of having large static data
structures in the code.

9 years agoExport the value of the signal used by scheduler (#4504)
Dmitry Astapov [Wed, 8 Dec 2010 18:37:55 +0000 (18:37 +0000)] 
Export the value of the signal used by scheduler (#4504)

9 years agoTweak the "sorry" message a bit
Simon Marlow [Wed, 8 Dec 2010 16:32:12 +0000 (16:32 +0000)] 
Tweak the "sorry" message a bit

- "sorry! (this is work in progress)\n"
+ "sorry! (unimplemented feature or known bug)\n"

9 years ago:unset settings support
Boris Lykah [Tue, 23 Nov 2010 19:01:32 +0000 (19:01 +0000)] 
:unset settings support
Added support for settings [args, prog, prompt, editor and stop].
Now :unset supports the same set of options as :set.

9 years agoFix Windows memory freeing: add a check for fb == NULL; fixes trac #4506
Ian Lynagh [Wed, 8 Dec 2010 15:23:49 +0000 (15:23 +0000)] 
Fix Windows memory freeing: add a check for fb == NULL; fixes trac #4506
Also added a few comments, and a load of code got indented 1 level deeper.

9 years agoFixes for #4512: EventLog.c - provides ability to terminate event logging, Schedule...
Dmitry Astapov [Fri, 3 Dec 2010 13:39:50 +0000 (13:39 +0000)] 
Fixes for #4512: EventLog.c - provides ability to terminate event logging, Schedule.c - uses them in forkProcess.

9 years agoMake CPPFLAGS variables, as well as CFLAGS and LDFLAGS
Ian Lynagh [Tue, 7 Dec 2010 01:00:33 +0000 (01:00 +0000)] 
Make CPPFLAGS variables, as well as CFLAGS and LDFLAGS
This fixes the "does unsetenv return void" test in the unix package on
OS X, if I tell it to make 10.4-compatible binaries. The test uses
CPPFLAGS but not CFLAGS, so it thought it returned int (as it was
in 10.5-mode), but the C compiler (using CFLAGS, so in 10.4 mode)
thought it returned void.

I also added CONF_LD_OPTS_STAGE$3 to the list of things in LDFLAGS,
which looks like an accidental ommission.

9 years agoAdd a configure message
Ian Lynagh [Mon, 6 Dec 2010 21:52:01 +0000 (21:52 +0000)] 
Add a configure message

9 years agoLink even programs containing no Haskell modules with GHC
Ian Lynagh [Mon, 6 Dec 2010 20:33:29 +0000 (20:33 +0000)] 
Link even programs containing no Haskell modules with GHC
I don't remember why we made it use gcc instead, but going back to
using ghc doesn't seem to break anything, and should fix the build
on OS X 10.6.

9 years agoCorrect the stage that the includes/ tools are built in
Ian Lynagh [Mon, 6 Dec 2010 20:31:25 +0000 (20:31 +0000)] 
Correct the stage that the includes/ tools are built in

9 years agoTweak the cleaning of inplace/; fixes trac #4320
Ian Lynagh [Sun, 5 Dec 2010 21:20:48 +0000 (21:20 +0000)] 
Tweak the cleaning of inplace/; fixes trac #4320

9 years agoClose .ghci files after reading them; fixes trac #4487
Ian Lynagh [Sun, 5 Dec 2010 20:53:01 +0000 (20:53 +0000)] 
Close .ghci files after reading them; fixes trac #4487

9 years agoFix the behaviour of :history for ticks surrounding top level functions
pepeiborra@gmail.com [Fri, 3 Dec 2010 20:23:46 +0000 (20:23 +0000)] 
Fix the behaviour of :history for ticks surrounding top level functions

9 years agoDon't warn of duplicate exports in case of module exports.
Michal Terepeta [Sat, 27 Nov 2010 21:21:16 +0000 (21:21 +0000)] 
Don't warn of duplicate exports in case of module exports.

But only when the module exports refer to different modules.
See ticket #4478.

9 years agoFix whitespace/layout in RnNames.
Michal Terepeta [Sat, 30 Oct 2010 17:13:03 +0000 (17:13 +0000)] 
Fix whitespace/layout in RnNames.

9 years agoTell gcc to support back to OS X 10.5
Ian Lynagh [Fri, 3 Dec 2010 20:15:58 +0000 (20:15 +0000)] 
Tell gcc to support back to OS X 10.5

9 years agoMake RelaxedLayout off by default
Ian Lynagh [Thu, 2 Dec 2010 14:08:08 +0000 (14:08 +0000)] 
Make RelaxedLayout off by default
I suspect this is a vary rarely used extension to the official layout
rule.

9 years agoFix up TcInstDcls
simonpj@microsoft.com [Fri, 3 Dec 2010 18:07:58 +0000 (18:07 +0000)] 
Fix up TcInstDcls

I really don't know how this module got left out of my last
patch, namely
  Thu Dec  2 12:35:47 GMT 2010  simonpj@microsoft.com
  * Re-jig simplifySuperClass (again)

I suggest you don't pull either the patch above, or this
one, unless you really have to.  I'm not fully confident
that it works properly yet.  Ran out of time. Sigh.

9 years agothrowTo: report the why_blocked value in the barf()
Simon Marlow [Fri, 3 Dec 2010 09:48:40 +0000 (09:48 +0000)] 
throwTo: report the why_blocked value in the barf()

9 years agohandle ThreadMigrating in throwTo() (#4811)
Simon Marlow [Fri, 3 Dec 2010 09:48:18 +0000 (09:48 +0000)] 
handle ThreadMigrating in throwTo() (#4811)
If a throwTo targets a thread that has just been created with
forkOnIO, then it is possible the exception strikes while the thread
is still in the process of migrating.  throwTo() didn't handle this
case, but it's fairly straightforward.

9 years agoremoveThreadFromQueue: stub out the link field before returning (#4813)
Simon Marlow [Thu, 2 Dec 2010 16:08:38 +0000 (16:08 +0000)] 
removeThreadFromQueue: stub out the link field before returning (#4813)

9 years agosmall tidyup
Simon Marlow [Fri, 26 Nov 2010 14:06:20 +0000 (14:06 +0000)] 
small tidyup

9 years agoFix a recomp bug: make classes/datatypes depend directly on DFuns (#4469)
Simon Marlow [Thu, 2 Dec 2010 12:23:49 +0000 (12:23 +0000)] 
Fix a recomp bug: make classes/datatypes depend directly on DFuns (#4469)
And remove the old mechanism of recording dfun uses separately,
because it didn't work.

This wiki page describes recompilation avoidance and fingerprinting.
I'll update it to describe the new method and what went wrong with the
old method:

http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/RecompilationAvoidance

9 years agomake a panic message more informative and suggest -dcore-lint (see #4534)
Simon Marlow [Wed, 1 Dec 2010 15:17:06 +0000 (15:17 +0000)] 
make a panic message more informative and suggest -dcore-lint (see #4534)

9 years agoRe-jig simplifySuperClass (again)
simonpj@microsoft.com [Thu, 2 Dec 2010 12:35:47 +0000 (12:35 +0000)] 
Re-jig simplifySuperClass (again)

This fixes the current loop in T3731, and will fix other
reported loops.  The loops show up when we are generating
evidence for superclasses in an instance declaration.

The trick is to make the "self" dictionary simplifySuperClass
depend *explicitly* on the superclass we are currently trying
to build.  See Note [Dependencies in self dictionaries] in TcSimplify.

That in turn means that EvDFunApp needs a dependency-list, used
when chasing dependencies in isGoodRecEv.

9 years agoA little refactoring (remove redundant argument passed to isGoodRecEv)
simonpj@microsoft.com [Thu, 2 Dec 2010 12:31:10 +0000 (12:31 +0000)] 
A little refactoring (remove redundant argument passed to isGoodRecEv)

9 years agoMake rebindable if-then-else a little more permissive
simonpj@microsoft.com [Thu, 2 Dec 2010 12:25:40 +0000 (12:25 +0000)] 
Make rebindable if-then-else a little more permissive

See Note [Rebindable syntax for if].  Fixes Trac #4798.
Thanks to Nils Schweinsberg <mail@n-sch.de>

9 years agoImprove error message (Trac #4799)
simonpj@microsoft.com [Thu, 2 Dec 2010 10:27:06 +0000 (10:27 +0000)] 
Improve error message (Trac #4799)

9 years agoFix a nasty bug in RULE matching: Trac #4814
simonpj@microsoft.com [Thu, 2 Dec 2010 10:26:18 +0000 (10:26 +0000)] 
Fix a nasty bug in RULE matching: Trac #4814

See Note [Matching lets], which explains it all in detail.
It took me a day to think of a nice way to fix the bug,
but I think the result is quite respectable. Subtle, though.

9 years agoRename -XPArr to -XParallelArrays
Ben Lippmeier [Tue, 30 Nov 2010 07:54:15 +0000 (07:54 +0000)] 
Rename -XPArr to -XParallelArrays

9 years agoFIX #1845 (unconditional relative branch out of range)
pho@cielonegro.org [Tue, 30 Nov 2010 14:30:14 +0000 (14:30 +0000)] 
FIX #1845 (unconditional relative branch out of range)

Don't use mmap on powerpc-apple-darwin as mmap doesn't support
reallocating but we need to allocate jump islands just after each
object images. Otherwise relative branches to jump islands can fail
due to 24-bits displacement overflow.