ghc-hetmet.git
15 years agoMake versioned ghc and ghci programs on Windows; fixes trac #2827
Ian Lynagh [Tue, 17 Feb 2009 21:50:48 +0000 (21:50 +0000)]
Make versioned ghc and ghci programs on Windows; fixes trac #2827

15 years agoSPARC NCG: Unsigned comparisons are unsigned
Ben.Lippmeier@anu.edu.au [Tue, 17 Feb 2009 03:52:00 +0000 (03:52 +0000)]
SPARC NCG: Unsigned comparisons are unsigned

15 years agoSPARC NCG: Fix word size conversions
Ben.Lippmeier@anu.edu.au [Tue, 17 Feb 2009 02:33:22 +0000 (02:33 +0000)]
SPARC NCG: Fix word size conversions

15 years agoSPARC NCG: Split up into chunks, and fix warnings.
Ben.Lippmeier@anu.edu.au [Mon, 16 Feb 2009 02:00:38 +0000 (02:00 +0000)]
SPARC NCG: Split up into chunks, and fix warnings.

15 years agoSPARC NCG: Reorganise Reg and RegInfo
Ben.Lippmeier@anu.edu.au [Mon, 16 Feb 2009 00:09:45 +0000 (00:09 +0000)]
SPARC NCG: Reorganise Reg and RegInfo

15 years agoNCG: Cleanup old file
Ben.Lippmeier@anu.edu.au [Mon, 16 Feb 2009 00:08:47 +0000 (00:08 +0000)]
NCG: Cleanup old file

15 years agoNCG: validate fixes for ppc-darwin
Ben.Lippmeier@anu.edu.au [Sun, 15 Feb 2009 08:36:01 +0000 (08:36 +0000)]
NCG: validate fixes for ppc-darwin

15 years agoNCG: validate fixes for ghc-6.6
Ben.Lippmeier@anu.edu.au [Sun, 15 Feb 2009 07:13:34 +0000 (07:13 +0000)]
NCG: validate fixes for ghc-6.6

15 years agoNCG: validate fixes for i386-darwin
Ben.Lippmeier@anu.edu.au [Sun, 15 Feb 2009 07:32:34 +0000 (07:32 +0000)]
NCG: validate fixes for i386-darwin

15 years agoNCG: validate fixes for x86_64-linux
Ben.Lippmeier@anu.edu.au [Sun, 15 Feb 2009 07:23:25 +0000 (07:23 +0000)]
NCG: validate fixes for x86_64-linux

15 years agoNCG: Haddock validate fix
Ben.Lippmeier@anu.edu.au [Sun, 15 Feb 2009 06:37:10 +0000 (06:37 +0000)]
NCG: Haddock validate fix

15 years agoNCG: Validate fixes for x86-linux
Ben.Lippmeier@anu.edu.au [Sun, 15 Feb 2009 06:23:21 +0000 (06:23 +0000)]
NCG: Validate fixes for x86-linux

15 years agoSPARC NCG: Don't release top half of f6 and f8
Ben.Lippmeier@anu.edu.au [Sun, 15 Feb 2009 06:19:40 +0000 (06:19 +0000)]
SPARC NCG: Don't release top half of f6 and f8

15 years agoNCG: Split up the native code generator into arch specific modules
Ben.Lippmeier@anu.edu.au [Sun, 15 Feb 2009 05:51:58 +0000 (05:51 +0000)]
NCG: Split up the native code generator into arch specific modules

  - nativeGen/Instruction defines a type class for a generic
    instruction set. Each of the instruction sets we have,
    X86, PPC and SPARC are instances of it.

  - The register alloctors use this type class when they need
    info about a certain register or instruction, such as
    regUsage, mkSpillInstr, mkJumpInstr, patchRegs..

  - nativeGen/Platform defines some data types enumerating
    the architectures and operating systems supported by the
    native code generator.

  - DynFlags now keeps track of the current build platform, and
    the PositionIndependentCode module uses this to decide what
    to do instead of relying of #ifdefs.

  - It's not totally retargetable yet. Some info info about the
    build target is still hardwired, but I've tried to contain
    most of it to a single module, TargetRegs.

  - Moved the SPILL and RELOAD instructions into LiveInstr.

  - Reg and RegClass now have their own modules, and are shared
    across all architectures.

15 years agoSPARC NCG: Make linear allocator use info in SPARC.Regs again
Ben.Lippmeier@anu.edu.au [Wed, 11 Feb 2009 05:40:21 +0000 (05:40 +0000)]
SPARC NCG: Make linear allocator use info in SPARC.Regs again

15 years agoSPARC NCG: Enumerate freeRegs / globalRegMaybe instead of using #ifdefery
Ben.Lippmeier@anu.edu.au [Wed, 11 Feb 2009 02:53:30 +0000 (02:53 +0000)]
SPARC NCG: Enumerate freeRegs / globalRegMaybe instead of using #ifdefery

15 years agoNCG: Split PprMach into arch specific modules
Ben.Lippmeier@anu.edu.au [Thu, 5 Feb 2009 08:12:42 +0000 (08:12 +0000)]
NCG: Split PprMach into arch specific modules
  - There are still some #ifdefs for choosing between i386, x86_64,
      linux, darwin and other OS's.
  - Also reformat SPARC.RegInfo to remove some of the visual noise.

15 years agoPut RelaxedPolyRec in the cabal file rather than a pragma
Ian Lynagh [Fri, 13 Feb 2009 18:56:35 +0000 (18:56 +0000)]
Put RelaxedPolyRec in the cabal file rather than a pragma
This should fix the build with GHC 6.6

15 years agoupdate Sparc store/load barrier (#3019), and fix comments
Simon Marlow [Thu, 12 Feb 2009 09:23:40 +0000 (09:23 +0000)]
update Sparc store/load barrier (#3019), and fix comments

15 years agocomment wibbles
Simon Marlow [Wed, 11 Feb 2009 15:28:44 +0000 (15:28 +0000)]
comment wibbles

15 years agoNCG: Use sync instead of msync for a memory barrier for powerpc
Ben.Lippmeier@anu.edu.au [Fri, 13 Feb 2009 00:49:10 +0000 (00:49 +0000)]
NCG: Use sync instead of msync for a memory barrier for powerpc
  Darwin 9.6.0 + GCC 4.0.1 doesn't understand "msync".
  I think "sync" means the same thing.

15 years agoNCG: Split block reorder thing in linear allocator into separate fn
Ben.Lippmeier@anu.edu.au [Fri, 13 Feb 2009 00:48:19 +0000 (00:48 +0000)]
NCG: Split block reorder thing in linear allocator into separate fn

15 years agoNCG: Validate fixes for powerpc
Ben.Lippmeier@anu.edu.au [Fri, 13 Feb 2009 00:47:25 +0000 (00:47 +0000)]
NCG: Validate fixes for powerpc

15 years agoNCG: Add missing ops to powerpc isJumpish
Ben.Lippmeier@anu.edu.au [Fri, 13 Feb 2009 00:46:47 +0000 (00:46 +0000)]
NCG: Add missing ops to powerpc isJumpish

15 years agoOnly pass --with-hscolour to cabal-bin once
Ian Lynagh [Thu, 12 Feb 2009 14:10:23 +0000 (14:10 +0000)]
Only pass --with-hscolour to cabal-bin once

15 years agoQuote some more arguments to cabal-bin
Ian Lynagh [Thu, 12 Feb 2009 14:11:20 +0000 (14:11 +0000)]
Quote some more arguments to cabal-bin

15 years agoAdd more targets to the list that we need to include all libraries for
Ian Lynagh [Wed, 11 Feb 2009 17:33:33 +0000 (17:33 +0000)]
Add more targets to the list that we need to include all libraries for

15 years agoFix Trac #3017: ensure that we quantify over enough type variables when equalities...
simonpj@microsoft.com [Wed, 11 Feb 2009 17:47:33 +0000 (17:47 +0000)]
Fix Trac #3017: ensure that we quantify over enough type variables when equalities are involved

The function FunDeps.grow was not doing the right thing when type equality
constraints were involved.  That wasn't really its fault: its input was
being filtered by fdPredsOfInsts.

To fix this I did a bit of refactoring, so that the (revolting) fdPredsOfInsts
is now less important (maybe we can get rid of it in due course).  The 'grow'
function moves from FunDeps to
 Inst.growInstsTyVars
 TcMTType.growThetaTyVars
 TcMType.growTyVars

The main comments are with the first of these, in
Note [Growing the tau-tvs using constraints] in Inst.

Push to the branch if conflict free.

15 years agogeneral tidy up
Simon Marlow [Wed, 11 Feb 2009 15:24:29 +0000 (15:24 +0000)]
general tidy up

15 years agoone more bugfix: a load/load memory barrier is required in stealWSDeque_()
Simon Marlow [Wed, 11 Feb 2009 15:24:21 +0000 (15:24 +0000)]
one more bugfix: a load/load memory barrier is required in stealWSDeque_()

15 years agoFix trac #3001: Biographical profiling segfaults
Ian Lynagh [Wed, 11 Feb 2009 15:34:57 +0000 (15:34 +0000)]
Fix trac #3001: Biographical profiling segfaults
We were zeroing the wrong memory

15 years agoTweak the mangler; fixes trac #2871
Ian Lynagh [Wed, 11 Feb 2009 15:03:40 +0000 (15:03 +0000)]
Tweak the mangler; fixes trac #2871
It was getting confused by lines like:
 # 9 "C:\Temp\/ghc620_0/ghc620_0.hc" 1

15 years agoOn sparc, pass -mcpu=v9 when assembling with object splitting enabled
Ian Lynagh [Wed, 11 Feb 2009 14:16:00 +0000 (14:16 +0000)]
On sparc, pass -mcpu=v9 when assembling with object splitting enabled
Fixes trac #2872.

15 years agoTurn another ASSERT into a WARN (temproraily)
simonpj@microsoft.com [Wed, 11 Feb 2009 09:40:28 +0000 (09:40 +0000)]
Turn another ASSERT into a WARN (temproraily)

Fix Trac #3011 by temporarily making it only a WARN if we assign twice
to the same unification variable.

15 years agoImprove documentation for LANGUAGE pragma (esp wrt cpp)
simonpj@microsoft.com [Wed, 11 Feb 2009 09:39:39 +0000 (09:39 +0000)]
Improve documentation for LANGUAGE pragma (esp wrt cpp)

15 years agoDon't use the absolute path to the bindist tarball
Ian Lynagh [Tue, 10 Feb 2009 21:52:15 +0000 (21:52 +0000)]
Don't use the absolute path to the bindist tarball
On Windows, we end up doing something like
    rsync c:/build/ghc-6.10.1-unknown-mingw32.tar.bz2 haskell.org:dist
and it thinks that it is meant to get the file from the host called "c".
Now we just do
    rsync ghc-6.10.1-unknown-mingw32.tar.bz2 haskell.org:dist
so rsync understand what we mean.

15 years agoFix cleaning and installing the libraries
Ian Lynagh [Tue, 10 Feb 2009 22:55:38 +0000 (22:55 +0000)]
Fix cleaning and installing the libraries
When cleaning or installing, we need to ignore what $stage is, and
just clean/install all the libraries.

15 years agoscheduleYield(): check the wakeup queue before yielding
Simon Marlow [Mon, 9 Feb 2009 11:25:36 +0000 (11:25 +0000)]
scheduleYield(): check the wakeup queue before yielding

15 years agoImprovements to the "can't find module" error message (#2980)
Simon Marlow [Fri, 6 Feb 2009 16:57:43 +0000 (16:57 +0000)]
Improvements to the "can't find module" error message (#2980)
If the module was found in multiple hidden packages, we list them all.

Could not find module `Data.Generics':
  it is a member of the hidden package `base-3.0.3.0'
  it is a member of the hidden package `syb'
  Use -v to see a list of the files searched for.

15 years agobuild fix: add -I../rts/parallel
Simon Marlow [Fri, 6 Feb 2009 14:59:21 +0000 (14:59 +0000)]
build fix: add -I../rts/parallel

15 years agocrucial bugfix: add a store/load memory barrier to popWSDeque()
Simon Marlow [Fri, 6 Feb 2009 13:08:04 +0000 (13:08 +0000)]
crucial bugfix: add a store/load memory barrier to popWSDeque()

15 years agobugfix: an unsigned comparison should be signed
Simon Marlow [Fri, 6 Feb 2009 13:07:45 +0000 (13:07 +0000)]
bugfix: an unsigned comparison should be signed

15 years agotiny cleanup
Simon Marlow [Fri, 6 Feb 2009 13:07:15 +0000 (13:07 +0000)]
tiny cleanup

15 years agoadd debugging code and comments
Simon Marlow [Fri, 6 Feb 2009 13:06:09 +0000 (13:06 +0000)]
add debugging code and comments

15 years agoadd an assertion
Simon Marlow [Fri, 6 Feb 2009 13:03:38 +0000 (13:03 +0000)]
add an assertion

15 years agoadd a single-threaded version of cas()
Simon Marlow [Fri, 6 Feb 2009 13:01:30 +0000 (13:01 +0000)]
add a single-threaded version of cas()

15 years agoadd a store/load memory barrier
Simon Marlow [Fri, 6 Feb 2009 13:01:15 +0000 (13:01 +0000)]
add a store/load memory barrier

15 years agoRefactor the spark queue implementation into a generic work-stealing deque
Simon Marlow [Thu, 5 Feb 2009 12:46:48 +0000 (12:46 +0000)]
Refactor the spark queue implementation into a generic work-stealing deque
So we can use this abstraction elsewhere in the RTS

15 years agoHandle the case where setitimer(ITIMER_VIRTUAL) is not always available
Ian Lynagh [Sun, 8 Feb 2009 19:14:31 +0000 (19:14 +0000)]
Handle the case where setitimer(ITIMER_VIRTUAL) is not always available
Patch from sthibaul. Fixes trac #2883.

15 years agoCorrect an IsFunction that should be IsData
Ian Lynagh [Sat, 7 Feb 2009 00:58:34 +0000 (00:58 +0000)]
Correct an IsFunction that should be IsData

15 years agoFix calling maths functions when compiling via C
Ian Lynagh [Fri, 6 Feb 2009 22:31:19 +0000 (22:31 +0000)]
Fix calling maths functions when compiling via C

15 years agoAdd a panic to fix the build on amd64/Linux; to be fixed properly later
Ian Lynagh [Fri, 6 Feb 2009 15:31:35 +0000 (15:31 +0000)]
Add a panic to fix the build on amd64/Linux; to be fixed properly later

15 years agoFix the build on OS X: only understands .space, not .skip
Ian Lynagh [Fri, 6 Feb 2009 15:12:03 +0000 (15:12 +0000)]
Fix the build on OS X: only understands .space, not .skip

15 years agoFix building with GHC 6.8
Ian Lynagh [Fri, 6 Feb 2009 14:34:32 +0000 (14:34 +0000)]
Fix building with GHC 6.8

15 years agoFix the build on amd64/Linux
Ian Lynagh [Fri, 6 Feb 2009 14:34:20 +0000 (14:34 +0000)]
Fix the build on amd64/Linux

15 years agoWhen generating C, don't pretend functions are data
Ian Lynagh [Fri, 6 Feb 2009 14:02:49 +0000 (14:02 +0000)]
When generating C, don't pretend functions are data
We used to generated things like:
    extern StgWordArray (newCAF) __attribute__((aligned (8)));
    ((void (*)(void *))(W_)&newCAF)((void *)R1.w);
(which is to say, pretend that newCAF is some data, then cast it to a
function and call it).
This goes wrong on at least IA64, where:
    A function pointer on the ia64 does not point to the first byte of
    code. Intsead, it points to a structure that describes the function.
    The first quadword in the structure is the address of the first byte
    of code
so we end up dereferencing function pointers one time too many, and
segfaulting.

15 years agoNCG: Validate fixes
Ben.Lippmeier@anu.edu.au [Thu, 5 Feb 2009 08:06:24 +0000 (08:06 +0000)]
NCG: Validate fixes

15 years agoNCG: Split RegAllocInfo into arch specific modules
Ben.Lippmeier@anu.edu.au [Wed, 4 Feb 2009 05:51:26 +0000 (05:51 +0000)]
NCG: Split RegAllocInfo into arch specific modules

15 years agoNCG: Move RegLiveness -> RegAlloc.Liveness
Ben.Lippmeier@anu.edu.au [Wed, 4 Feb 2009 03:52:50 +0000 (03:52 +0000)]
NCG: Move RegLiveness -> RegAlloc.Liveness

15 years agoNCG: Rename MachRegs, MachInstrs -> Regs, Instrs to reflect arch specific naming
Ben.Lippmeier@anu.edu.au [Wed, 4 Feb 2009 03:41:07 +0000 (03:41 +0000)]
NCG: Rename MachRegs, MachInstrs -> Regs, Instrs to reflect arch specific naming

15 years agoNCG: Split MachRegs.hs into arch specific modules
Ben.Lippmeier@anu.edu.au [Wed, 4 Feb 2009 03:07:29 +0000 (03:07 +0000)]
NCG: Split MachRegs.hs into arch specific modules

15 years agoNCG: Fix validate
Ben.Lippmeier@anu.edu.au [Thu, 5 Feb 2009 03:06:42 +0000 (03:06 +0000)]
NCG: Fix validate

15 years agoSPARC NCG: Fix some haddock problems.
Ben.Lippmeier@anu.edu.au [Wed, 4 Feb 2009 04:38:02 +0000 (04:38 +0000)]
SPARC NCG: Fix some haddock problems.

15 years agoSPARC NCG: Add Pwr callish mach op
Ben.Lippmeier@anu.edu.au [Wed, 4 Feb 2009 00:09:05 +0000 (00:09 +0000)]
SPARC NCG: Add Pwr callish mach op

15 years agoNCG: Split MachInstrs into arch specific modules
Ben.Lippmeier@anu.edu.au [Tue, 3 Feb 2009 08:13:27 +0000 (08:13 +0000)]
NCG: Split MachInstrs into arch specific modules

15 years agoNCG: Move the graph allocator into its own dir
Ben.Lippmeier@anu.edu.au [Tue, 3 Feb 2009 07:14:11 +0000 (07:14 +0000)]
NCG: Move the graph allocator into its own dir

15 years agoSPARC NCG: Update cabal file
Ben.Lippmeier@anu.edu.au [Tue, 3 Feb 2009 06:27:46 +0000 (06:27 +0000)]
SPARC NCG: Update cabal file

15 years agoSPARC NCG: Give regs o0-o5 back to the allocator
Ben.Lippmeier@anu.edu.au [Tue, 3 Feb 2009 06:24:33 +0000 (06:24 +0000)]
SPARC NCG: Give regs o0-o5 back to the allocator

15 years agoNCG: Split out joinToTargets from linear alloctor into its own module.
Ben.Lippmeier@anu.edu.au [Tue, 3 Feb 2009 04:05:40 +0000 (04:05 +0000)]
NCG: Split out joinToTargets from linear alloctor into its own module.

 * Also fix a nasty bug when creating fixup code that has a cyclic
   register movement graph.

15 years agoNCG: Split linear allocator into separate modules.
Ben.Lippmeier@anu.edu.au [Mon, 2 Feb 2009 05:53:01 +0000 (05:53 +0000)]
NCG: Split linear allocator into separate modules.

15 years agoSPARC NCG: Keep track of destinations when doing a tabled jump
Ben.Lippmeier@anu.edu.au [Fri, 23 Jan 2009 05:22:47 +0000 (05:22 +0000)]
SPARC NCG: Keep track of destinations when doing a tabled jump

15 years agoSPARC NCG: Do general 64 bit addition and conversion
Ben.Lippmeier@anu.edu.au [Fri, 23 Jan 2009 03:51:52 +0000 (03:51 +0000)]
SPARC NCG: Do general 64 bit addition and conversion

15 years agoSPARC NCG: Don't need a write barrier for store synchronisation on SPARC under TSO.
Ben.Lippmeier@anu.edu.au [Fri, 23 Jan 2009 00:50:51 +0000 (00:50 +0000)]
SPARC NCG: Don't need a write barrier for store synchronisation on SPARC under TSO.

15 years agoSPARC NCG: Use .skip instead of .space in assembler
Ben.Lippmeier@anu.edu.au [Thu, 22 Jan 2009 22:51:50 +0000 (22:51 +0000)]
SPARC NCG: Use .skip instead of .space in assembler

 - In the GNU assembler they mean the same thing
 - The Solaris assembler only has .skip

15 years agoCheck -XGADTs in (a) type family decls (b) pattern matches
simonpj@microsoft.com [Wed, 4 Feb 2009 15:09:19 +0000 (15:09 +0000)]
Check -XGADTs in (a) type family decls (b) pattern matches

Following Trac #2905, we now require -XGADTs for *pattern matches* on
GADTs, not just on *definitions*.

Also I found that -XGADTs wasn't being checked when declaring type families,
so I fixed that too.

15 years agoImprove error reports for kind checking (Trac #2994)
simonpj@microsoft.com [Wed, 4 Feb 2009 15:07:36 +0000 (15:07 +0000)]
Improve error reports for kind checking (Trac #2994)

I followed the suggestion in Trac #2994, which took longer than I
expected.  As usual I did a bit of tidying up at the same time,
and improved a few other error reports.

15 years agoFurther wibbles to 'deriving' for functor-like things
simonpj@microsoft.com [Wed, 4 Feb 2009 15:06:25 +0000 (15:06 +0000)]
Further wibbles to 'deriving' for functor-like things

15 years agoleave out rts/ from include-dirs in the inplace rts package
Simon Marlow [Wed, 4 Feb 2009 10:47:48 +0000 (10:47 +0000)]
leave out rts/ from include-dirs in the inplace rts package
it shouldn't be there, and might hide bugs

15 years agoFix Trac #2999: change an ASSERT to a WARN
simonpj@microsoft.com [Wed, 4 Feb 2009 08:38:00 +0000 (08:38 +0000)]
Fix Trac #2999: change an ASSERT to a WARN

A bug in the constraint simplifier means that an equality can be solved
twice.  It's harmless, and will go away with the new constraint simplifier.
Hence warning, to avoid unnecessary outright failure on eg Trac #2999.

15 years agoImprove transferPolyIdInfo for value-arg abstraction
simonpj@microsoft.com [Wed, 4 Feb 2009 08:25:34 +0000 (08:25 +0000)]
Improve transferPolyIdInfo for value-arg abstraction

If we float a binding out of a *value* lambda, the fixing-up of IdInfo
is a bit more complicated than before.  Since in principle FloatOut
can do this (and thus can do full lambda lifting), it's imporrtant
that transferPolyIdInfo does the Right Thing.

This doensn't matter unless you use FloatOut's abilty to lambda-lift,
which GHC mostly doesn't, yet.  But Max used it and tripped over this bug.

15 years agoTwo small improvements to LiberateCase
simonpj@microsoft.com [Wed, 4 Feb 2009 08:19:19 +0000 (08:19 +0000)]
Two small improvements to LiberateCase

Max Bolingbroke suggested these two small improvements to LiberateCase
(most of the size increase is comments :-)):

a) Do LiberateCase on small functions even if they are mutually recursive
   See Note [Small enough]

b) Don't do LiberateCase on functions for which it'd be fruitless,
   namely when a free varible is scrutinised *outside* the function
   See Note [Avoiding fruitless liberate-case]

There is virtually no effect on nofib, but Max tripped over cases
where it mattered slightly.

15 years agoRobustify lookupFamInstEnv, plus some refactoring
simonpj@microsoft.com [Thu, 15 Jan 2009 13:48:18 +0000 (13:48 +0000)]
Robustify lookupFamInstEnv, plus some refactoring

This patch deals with the following remark

     Suppose we have
            type family T a :: * -> *
            type instance T Int = []

     and now we encounter the type (T Int Bool).  If we call
     lookupFamInstEnv on (T Int Bool) we'll fail, because T has arity 1.
     Indeed, I *think* it's a precondition of lookupFamInstEnv that the
     supplied types exactly match the arity of the type function.  But
     that precondition is neither stated, nor is there an assertion to
     check it.

With this patch, lookupFamInstEnv can take "extra" type arguments in
the over-saturated case, and does the Right Thing.

There was a nearly-identical function lookupFamInstEnvUnify, which
required the precisely analogous change, so I took the opportunity
to combine the two into one function, so that bugs can be fixed in one
place.  This was a bit harder than I expected, but I think the result
is ok.  The conflict-decision function moves from FamInst to FamInstEnv.
Net lines code decreases, although there are more comments.

15 years agoRobustify lookupFamInstEnv
simonpj@microsoft.com [Wed, 14 Jan 2009 14:01:17 +0000 (14:01 +0000)]
Robustify lookupFamInstEnv

Suppose we have
        type family T a :: * -> *
        type instance T Int = []

and now we encounter the type (T Int Bool).  That is perfectly
fine, even though T is over-saturated here.

This patch makes lookupFamInstEnv robust to such over-saturation.
Previously one caller (TcTyFuns.tcUnfoldSynFamInst) dealt with
the over-saturation case, but the others did not. It's better
to desl with the issue at the root, in lookupFamInstEnv itself.

15 years agoImprove trace message
simonpj@microsoft.com [Tue, 13 Jan 2009 17:58:06 +0000 (17:58 +0000)]
Improve trace message

15 years agoBuild dph with the stage2 compiler
Ian Lynagh [Tue, 3 Feb 2009 21:36:13 +0000 (21:36 +0000)]
Build dph with the stage2 compiler
It will use TH, so needs to be built with stage2.

15 years agoOptimise writing out the .s file
Simon Marlow [Mon, 2 Feb 2009 14:50:13 +0000 (14:50 +0000)]
Optimise writing out the .s file
I noticed while working on the new IO library that GHC was writing out
the .s file in lots of little chunks.  It turns out that this is a
result of using multiple printDocs to avoid space leaks in the NCG,
where each printDoc is finishing up with an hFlush.

What's worse, is that this makes poor use of the optimisation inside
printDoc that uses its own buffering to avoid hitting the Handle all
the time.

So I hacked around this by making the buffering optimisation inside
Pretty visible from the outside, for use in the NCG.  The changes are
quite small.

15 years agobetter error message for missing package-qualified modules in ghc -M
Simon Marlow [Fri, 23 Jan 2009 14:20:01 +0000 (14:20 +0000)]
better error message for missing package-qualified modules in ghc -M

15 years agoadd wiki commentary links
Simon Marlow [Fri, 30 Jan 2009 11:08:44 +0000 (11:08 +0000)]
add wiki commentary links

15 years agoForce the result of user-defined commands
Simon Marlow [Fri, 30 Jan 2009 09:19:19 +0000 (09:19 +0000)]
Force the result of user-defined commands
so that exceptions are reported with "*** Exception" instead of as a panic.

15 years agoImprove error reporting for precedence errors
simonpj@microsoft.com [Mon, 2 Feb 2009 16:44:50 +0000 (16:44 +0000)]
Improve error reporting for precedence errors

Adopt the suggestion of Trac #2993, and tidy up the reporting of
precedence parsing errors somewhat.

15 years agoAdd the ability to derive instances of Functor, Foldable, Traversable
simonpj@microsoft.com [Mon, 2 Feb 2009 13:48:29 +0000 (13:48 +0000)]
Add the ability to derive instances of Functor, Foldable, Traversable

This patch is a straightforward extension of the 'deriving' mechanism.
The ability to derive classes Functor, Foldable, Traverable is controlled
by a single flag  -XDeriveFunctor.  (Maybe that's a poor name.)

Still to come: documentation

Thanks to twanvl for developing the patch

15 years agoComments about injecting implicit bindings
simonpj@microsoft.com [Fri, 30 Jan 2009 17:54:03 +0000 (17:54 +0000)]
Comments about injecting implicit bindings

15 years agoWarn in configure if it looks like make 3.80 is about to be used
Ian Lynagh [Sun, 1 Feb 2009 20:35:05 +0000 (20:35 +0000)]
Warn in configure if it looks like make 3.80 is about to be used
We get caught by
    http://savannah.gnu.org/bugs/index.php?1516
    $(eval ...) inside conditionals causes errors
with make 3.80, so warn the user if it looks like they're about to
try to use it.

15 years agoFix Trac #2985: generating superclasses and recursive dictionaries
simonpj@microsoft.com [Fri, 30 Jan 2009 15:27:38 +0000 (15:27 +0000)]
Fix Trac #2985: generating superclasses and recursive dictionaries

The Note [Recursive instances and superclases] explains the subtle
issues to do with generating the bindings for superclasses when
we compile an instance declaration, at least if we want to do the
clever "recursive superclass" idea from the SYB3 paper.

The old implementation of tcSimplifySuperClasses stumbled when
type equalities entered the picture (details in the Note); this
patch fixes the problem using a slightly hacky trick.  When we
re-engineer the constraint solver we'll want to keep an eye on
this.

Probably worth merging to the 6.10 branch.

15 years agoWhite space only
simonpj@microsoft.com [Fri, 30 Jan 2009 15:27:05 +0000 (15:27 +0000)]
White space only

15 years agoTwo more wibbles to CorePrep (fixes HTTP package and DPH)
simonpj@microsoft.com [Thu, 29 Jan 2009 13:19:54 +0000 (13:19 +0000)]
Two more wibbles to CorePrep (fixes HTTP package and DPH)

Ensuring that
  a) lambdas show up only on the RHSs of binding after CorePrep
  b) the arity of a binding exactly matches the maifest lambdas
is surprisingly tricky.

I got it wrong (again) in my recent CorePrep shuffling, which broke
packages HTTP and DPH.  This patch fixes both.

15 years agoRemove the doc/ contents from the GMP tarball
Ian Lynagh [Wed, 28 Jan 2009 20:07:49 +0000 (20:07 +0000)]
Remove the doc/ contents from the GMP tarball
They are GFDLed, which causes problems for Debian

15 years ago#2973: we should virtualise the CWD inside the GHC API, not in the client
Simon Marlow [Tue, 27 Jan 2009 12:16:48 +0000 (12:16 +0000)]
#2973: we should virtualise the CWD inside the GHC API, not in the client
The problem is that we install the client's CWD before calling
runStmt, but runStmt has to load modules before running the code.  We
need to install the CWD just before running the code instead, which
means it has to be done inside runStmt (and resume).

15 years agoFix detection of i386 vs. x86_64 for -pc-solaris
Simon Marlow [Tue, 27 Jan 2009 09:53:43 +0000 (09:53 +0000)]
Fix detection of i386 vs. x86_64 for -pc-solaris
From #2951

15 years agoImplement #2191 (traceCcs# -- prints CCS of a value when available -- take 3)
Samuel Bronson [Tue, 27 Jan 2009 08:48:25 +0000 (08:48 +0000)]
Implement #2191 (traceCcs# -- prints CCS of a value when available -- take 3)
In this version, I untag R1 before using it, and even enter R2 at the
end rather than simply returning it (which didn't work right when R2
was a thunk).