ghc.git
7 years agoMerge branch 'master' of darcs.haskell.org:/home/darcs/ghc
Simon Peyton Jones [Fri, 13 Jul 2012 13:26:36 +0000 (14:26 +0100)] 
Merge branch 'master' of darcs.haskell.org:/home/darcs/ghc

7 years agoDocument bug in the x86 NCG w.r.t. -fexcess-precision (#7069)
Simon Marlow [Fri, 13 Jul 2012 09:23:12 +0000 (10:23 +0100)] 
Document bug in the x86 NCG w.r.t. -fexcess-precision (#7069)

7 years agoUse dumpSDoc functions to output rules (#7060)
Paolo Capriotti [Thu, 12 Jul 2012 16:53:50 +0000 (17:53 +0100)] 
Use dumpSDoc functions to output rules (#7060)

Make -ddump-rules, -ddump-rule-firings and -ddump-rule-rewrites
behave like the other -ddump flags, by using the dumpSDoc function
instance of pprDefiniteTrace.

7 years agoAdd MonadIO instance to SimplM.
Paolo Capriotti [Thu, 12 Jul 2012 16:49:41 +0000 (17:49 +0100)] 
Add MonadIO instance to SimplM.

7 years agoAdd IO to the SimplM monad.
Paolo Capriotti [Thu, 12 Jul 2012 16:46:23 +0000 (17:46 +0100)] 
Add IO to the SimplM monad.

This is needed to turn the rule-firings traces into proper output.

7 years agoSpelling in comment
Simon Peyton Jones [Thu, 12 Jul 2012 07:23:50 +0000 (08:23 +0100)] 
Spelling in comment

7 years agoLink the extra-libraries when making a .so for a package (#7062)
Simon Marlow [Wed, 11 Jul 2012 13:32:47 +0000 (14:32 +0100)] 
Link the extra-libraries when making a .so for a package (#7062)

I don't think I completely understand what's going on here, but this
does seem to fix it, and morally it seems like the right thing.

7 years agoProfiling: don't report IDLE time by default
Simon Marlow [Wed, 11 Jul 2012 10:29:24 +0000 (11:29 +0100)] 
Profiling: don't report IDLE time by default

You can get it with +RTS -P, as with the other systemish cost centres
like "GC".

7 years agoAllow 'default' declarations in GHCi
Patrick Palka [Sun, 8 Jul 2012 16:49:22 +0000 (12:49 -0400)] 
Allow 'default' declarations in GHCi

7 years agoFix build for non x86/x86_64 (#7065)
Paolo Capriotti [Wed, 11 Jul 2012 13:07:19 +0000 (14:07 +0100)] 
Fix build for non x86/x86_64 (#7065)

7 years agoadjustHpBackwards before calling a let-no-escape
Simon Marlow [Tue, 10 Jul 2012 13:29:56 +0000 (14:29 +0100)] 
adjustHpBackwards before calling a let-no-escape

7 years agoSupport the 2-result primops in the new code generator
Simon Marlow [Tue, 10 Jul 2012 11:51:04 +0000 (12:51 +0100)] 
Support the 2-result primops in the new code generator

7 years agoremove some redundant SRT-related stuff
Simon Marlow [Mon, 9 Jul 2012 15:46:02 +0000 (16:46 +0100)] 
remove some redundant SRT-related stuff

7 years agoFix overlapping patterns warning (#7065)
Paolo Capriotti [Tue, 10 Jul 2012 09:36:03 +0000 (10:36 +0100)] 
Fix overlapping patterns warning (#7065)

7 years agoMake a little more of the GHCi internal API configurable
David Terei [Tue, 10 Jul 2012 21:21:07 +0000 (14:21 -0700)] 
Make a little more of the GHCi internal API configurable

7 years agoMerge branch 'master' of ../HEAD
Simon Peyton Jones [Tue, 10 Jul 2012 15:20:49 +0000 (16:20 +0100)] 
Merge branch 'master' of ../HEAD

7 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Tue, 10 Jul 2012 15:18:54 +0000 (16:18 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

7 years agoBe careful not to look for Functor unnecessarily
Simon Peyton Jones [Tue, 10 Jul 2012 15:15:16 +0000 (16:15 +0100)] 
Be careful not to look for Functor unnecessarily

Otherwise we try to load package 'base' when
we are compiling 'ghc-prim'.
See Note [Getting base classes]

7 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Tue, 10 Jul 2012 15:04:30 +0000 (16:04 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

Conflicts:
compiler/typecheck/TcRnDriver.lhs

7 years agoMore changes to kind inference for type and class declarations
Simon Peyton Jones [Tue, 10 Jul 2012 15:02:03 +0000 (16:02 +0100)] 
More changes to kind inference for type and class declarations

These should fix #7024 and #7022, among others.

The main difficulty was that we were getting occ-name clashes
between kind and type variables in TyCons, when spat into an
interface file. The new scheme is to tidy TyCons during the
conversoin into IfaceSyn, rather than trying to generate them
pre-tidied, which was the already-unsatisfactory previous plan.

There is the usual wave of refactorig as well.

7 years agoRemove dead code
Simon Peyton Jones [Tue, 10 Jul 2012 14:58:53 +0000 (15:58 +0100)] 
Remove dead code

7 years agoRemove dead code
Simon Peyton Jones [Tue, 10 Jul 2012 14:57:43 +0000 (15:57 +0100)] 
Remove dead code

7 years agoTidy up validity checking of types, esp in contexts
Simon Peyton Jones [Tue, 10 Jul 2012 14:56:55 +0000 (15:56 +0100)] 
Tidy up validity checking of types, esp in contexts

7 years agoSuppress ambiguity errors if there are other solid errors to report
Simon Peyton Jones [Tue, 10 Jul 2012 14:49:02 +0000 (15:49 +0100)] 
Suppress ambiguity errors if there are other solid errors to report

7 years agoComments and pretty printing
Simon Peyton Jones [Tue, 10 Jul 2012 14:48:03 +0000 (15:48 +0100)] 
Comments and pretty printing

7 years agoParallelise clearNurseries() in the parallel GC
Simon Marlow [Tue, 10 Jul 2012 08:57:53 +0000 (09:57 +0100)] 
Parallelise clearNurseries() in the parallel GC

The clearNurseries() operation resets the free pointer in each nursery
block to the start of the block, emptying the nursery.  In the
parallel GC this was done on the main GC thread, but that's bad
because it accesses the bdescr of every nursery block, and move all
those cache lines onto the CPU of the main GC thread.  With large
nurseries, this can be especially bad.  So instead we want to clear
each nursery in its local GC thread.

Thanks to Andreas Voellmy <andreas.voellmy@gmail.com> for idenitfying
the issue.

After this change and the previous patch to make the last GC a major
one, I see these results for nofib/parallel on 8 cores:

   blackscholes          +0.0%     +0.0%     -3.7%     -3.3%     +0.3%
          coins          +0.0%     +0.0%     -5.1%     -5.0%     +0.4%
           gray          +0.0%     +0.0%     -4.5%     -2.1%     +0.8%
         mandel          +0.0%     -0.0%     -7.6%     -5.1%     -2.3%
        matmult          +0.0%     +5.5%     -2.8%     -1.9%     -5.8%
        minimax          +0.0%     +0.0%    -10.6%    -10.5%     +0.0%
          nbody          +0.0%     -4.4%     +0.0%      0.07     +0.0%
         parfib          +0.0%     +1.0%     +0.5%     +0.9%     +0.0%
        partree          +0.0%     +0.0%     -2.4%     -2.5%     +1.7%
           prsa          +0.0%     -0.2%     +1.8%     +4.2%     +0.0%
         queens          +0.0%     -0.0%     -1.8%     -1.4%     -4.8%
            ray          +0.0%     -0.6%    -18.5%    -17.8%     +0.0%
       sumeuler          +0.0%     -0.0%     -3.7%     -3.7%     +0.0%
      transclos          +0.0%     -0.0%    -25.7%    -26.6%     +0.0%
--------------------------------------------------------------------------------
            Min          +0.0%     -4.4%    -25.7%    -26.6%     -5.8%
            Max          +0.0%     +5.5%     +1.8%     +4.2%     +1.7%
 Geometric Mean          +0.0%     +0.1%     -6.3%     -6.1%     -0.7%

7 years agoThe final GC should be a major one
Simon Marlow [Tue, 5 Jun 2012 20:17:00 +0000 (21:17 +0100)] 
The final GC should be a major one

We do a final GC before shutting down the system, to clean up.
However, we were doing an ordinary GC rather than forcing a major GC,
so especially when the allocation area is large, this final GC could
be expensive.  This is really just a bug - the final GC should have
virtually nothing to do, because there is nothing live.

7 years agoDon't duplicate arbitrary CmmCalls
Simon Marlow [Mon, 9 Jul 2012 15:23:21 +0000 (16:23 +0100)] 
Don't duplicate arbitrary CmmCalls

7 years agoTrack liveness of GlobalRegs in the new code generator
Simon Marlow [Mon, 9 Jul 2012 15:08:21 +0000 (16:08 +0100)] 
Track liveness of GlobalRegs in the new code generator

This gives the register allocator access to R1.., F1.., D1.. etc. for
the new code generator, and is a cheap way to eliminate all the extra
"x = R1" assignments that we get from copyIn.

7 years agoDon't look for objdump on OS X
Max Bolingbroke [Mon, 9 Jul 2012 14:05:39 +0000 (15:05 +0100)] 
Don't look for objdump on OS X

7 years agoDon't re-allocate %esi on x86.
Simon Marlow [Mon, 9 Jul 2012 12:16:53 +0000 (13:16 +0100)] 
Don't re-allocate %esi on x86.

Recent changes have freed up %esi for general use on x86 when it is
not being used for R1.  However, x86 has a non-uniform register
architecture where there is no 8-bit equivalent of %esi.  The register
allocators aren't sophisticated enough to cope with this, so we have
to back off and treat %esi as non-allocatable for now.  (of course,
LLVM doesn't suffer from this problem)

One workaround would be to change the calling convention to use %rbx
for R1, however we can't change the calling convention now without
patching LLVM too.

7 years agoFix compile failure on non x86/x86-64 (#7054).
Erik de Castro Lopo [Sat, 7 Jul 2012 01:32:21 +0000 (11:32 +1000)] 
Fix compile failure on non x86/x86-64 (#7054).

7 years agofix warning
Simon Marlow [Fri, 6 Jul 2012 15:09:23 +0000 (16:09 +0100)] 
fix warning

7 years agoput back the newtype around Label
Simon Marlow [Fri, 6 Jul 2012 13:32:14 +0000 (14:32 +0100)] 
put back the newtype around Label

Having all BlockIds print as integers was a pain for debugging.

7 years agoAllow the register allocator access to argument regs (R1.., F1.., etc.)
Simon Marlow [Fri, 6 Jul 2012 12:32:22 +0000 (13:32 +0100)] 
Allow the register allocator access to argument regs (R1.., F1.., etc.)

This was made possible by the recent change to codeGen to attach the
live GlobalRegs to every CmmJump, and we'll be relying on it quite
heavily in the new code generator too.

What this means essentially is that when we see

  x = R1

the register allocator will automatically assign x to R1 and generate
no code at all (also known as "coalescing"). It wasn't possible before
because the register allocator had to assume that R1 was always live,
because it didn't have access to accurate liveness information.

7 years agobugfix: coalescing moves from RealReg to VirtualReg got broken at some point
Simon Marlow [Fri, 6 Jul 2012 12:20:44 +0000 (13:20 +0100)] 
bugfix: coalescing moves from RealReg to VirtualReg got broken at some point

7 years agoGenerate slightly less crap to be cleaned up later
Simon Marlow [Fri, 6 Jul 2012 10:27:07 +0000 (11:27 +0100)] 
Generate slightly less crap to be cleaned up later

7 years agoRename BTail -> BCons, BHead -> BSnoc
Simon Marlow [Fri, 6 Jul 2012 10:21:33 +0000 (11:21 +0100)] 
Rename BTail -> BCons, BHead -> BSnoc

7 years agodo a pass over this file, remove obsolete stuff
Simon Marlow [Thu, 5 Jul 2012 14:24:33 +0000 (15:24 +0100)] 
do a pass over this file, remove obsolete stuff

7 years agoAdd documentation for -interactive-print (#5461)
Paolo Capriotti [Thu, 5 Jul 2012 18:46:52 +0000 (19:46 +0100)] 
Add documentation for -interactive-print (#5461)

Based on a patch by Vitaly Bragilevsky <bravit111@gmail.com>

7 years agoDelete some unused code
Simon Marlow [Thu, 5 Jul 2012 13:24:50 +0000 (14:24 +0100)] 
Delete some unused code

7 years agoMerge remote-tracking branch 'origin/master' into newcg
Simon Marlow [Thu, 5 Jul 2012 12:38:32 +0000 (13:38 +0100)] 
Merge remote-tracking branch 'origin/master' into newcg

* origin/master:
  prefer later defined commands (fixes #3858)

7 years agoRemove "fuel", adapt to Hoopl changes, fix warnings
Simon Marlow [Thu, 5 Jul 2012 12:23:21 +0000 (13:23 +0100)] 
Remove "fuel", adapt to Hoopl changes, fix warnings

7 years agoFix merge-related problems
Simon Marlow [Wed, 4 Jul 2012 12:19:26 +0000 (13:19 +0100)] 
Fix merge-related problems

7 years agoMerge remote-tracking branch 'origin/master' into newcg
Simon Marlow [Wed, 4 Jul 2012 09:34:48 +0000 (10:34 +0100)] 
Merge remote-tracking branch 'origin/master' into newcg

* origin/master: (756 commits)
  don't crash if argv[0] == NULL (#7037)
  -package P was loading all versions of P in GHCi (#7030)
  Add a Note, copying text from #2437
  improve the --help docs a bit (#7008)
  Copy Data.HashTable's hashString into our Util module
  Build fix
  Build fixes
  Parse error: suggest brackets and indentation.
  Don't build the ghc DLL on Windows; works around trac #5987
  On Windows, detect if DLLs have too many symbols; trac #5987
  Add some more Integer rules; fixes #6111
  Fix PA dfun construction with silent superclass args
  Add silent superclass parameters to the vectoriser
  Add silent superclass parameters (again)
  Mention Generic1 in the user's guide
  Make the GHC API a little more powerful.
  tweak llvm version warning message
  New version of the patch for #5461.
  Fix Word64ToInteger conversion rule.
  Implemented feature request on reconfigurable pretty-printing in GHCi (#5461)
  ...

Conflicts:
compiler/basicTypes/UniqSupply.lhs
compiler/cmm/CmmBuildInfoTables.hs
compiler/cmm/CmmLint.hs
compiler/cmm/CmmOpt.hs
compiler/cmm/CmmPipeline.hs
compiler/cmm/CmmStackLayout.hs
compiler/cmm/MkGraph.hs
compiler/cmm/OldPprCmm.hs
compiler/codeGen/CodeGen.lhs
compiler/codeGen/StgCmm.hs
compiler/codeGen/StgCmmBind.hs
compiler/codeGen/StgCmmLayout.hs
compiler/codeGen/StgCmmUtils.hs
compiler/main/CodeOutput.lhs
compiler/main/HscMain.hs
compiler/nativeGen/AsmCodeGen.lhs
compiler/simplStg/SimplStg.lhs

7 years agoprefer later defined commands (fixes #3858)
Peter Hercek [Tue, 15 May 2012 14:02:48 +0000 (16:02 +0200)] 
prefer later defined commands (fixes #3858)

7 years agoAdd an experimental sinking pass
Simon Marlow [Tue, 3 Jul 2012 14:19:34 +0000 (15:19 +0100)] 
Add an experimental sinking pass

7 years agono need to check for unreachable blocks with -fnew-codegen
Simon Marlow [Tue, 3 Jul 2012 14:19:15 +0000 (15:19 +0100)] 
no need to check for unreachable blocks with -fnew-codegen

we've already done it

7 years agomainly tidyup
Simon Marlow [Tue, 3 Jul 2012 14:18:33 +0000 (15:18 +0100)] 
mainly tidyup

7 years agodon't crash if argv[0] == NULL (#7037)
Simon Marlow [Mon, 2 Jul 2012 14:55:20 +0000 (15:55 +0100)] 
don't crash if argv[0] == NULL (#7037)

7 years ago-package P was loading all versions of P in GHCi (#7030)
Simon Marlow [Mon, 2 Jul 2012 14:04:05 +0000 (15:04 +0100)] 
-package P was loading all versions of P in GHCi (#7030)

-package P means "the latest version of P" if multiple versions are
installed.  It was working as advertised, but we were
eagerly *linking* all versions of P, which might cause an error if the
package has some C code, because we can't link multiple instances of
the same symbol.

7 years agoAdd a Note, copying text from #2437
Simon Marlow [Mon, 2 Jul 2012 13:52:12 +0000 (14:52 +0100)] 
Add a Note, copying text from #2437

7 years agoimprove the --help docs a bit (#7008)
Simon Marlow [Mon, 2 Jul 2012 12:16:13 +0000 (13:16 +0100)] 
improve the --help docs a bit (#7008)

7 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Sat, 30 Jun 2012 00:30:20 +0000 (01:30 +0100)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

7 years agoCopy Data.HashTable's hashString into our Util module
Ian Lynagh [Fri, 29 Jun 2012 23:45:42 +0000 (00:45 +0100)] 
Copy Data.HashTable's hashString into our Util module

Data.HashTable is now deprecated and will soon be removed, but
deSugar/Coverage.lhs uses hashString.

7 years agoBuild fix
Ian Lynagh [Fri, 29 Jun 2012 20:54:28 +0000 (21:54 +0100)] 
Build fix

7 years agoBuild fixes
Ian Lynagh [Fri, 29 Jun 2012 18:26:14 +0000 (19:26 +0100)] 
Build fixes

7 years agoParse error: suggest brackets and indentation.
Eric Kow [Wed, 27 Jun 2012 11:59:59 +0000 (12:59 +0100)] 
Parse error: suggest brackets and indentation.

I have observed that whenever GHC tells me that I have possibly
incorrect indentation, the real problem is often that I forgot
to close some sort of bracket.

7 years agoDon't build the ghc DLL on Windows; works around trac #5987
Ian Lynagh [Fri, 29 Jun 2012 16:47:32 +0000 (17:47 +0100)] 
Don't build the ghc DLL on Windows; works around trac #5987

We also don't build DLLs for the dph-lifted-* packages as they depend
on ghc.

7 years agoOn Windows, detect if DLLs have too many symbols; trac #5987
Ian Lynagh [Fri, 29 Jun 2012 00:33:17 +0000 (01:33 +0100)] 
On Windows, detect if DLLs have too many symbols; trac #5987

The test isn't very pretty; it involves trawling through the
objdump -p output. I couldn't find an easier way, unfortuantely.

7 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Wed, 27 Jun 2012 20:51:29 +0000 (21:51 +0100)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

7 years agoAdd some more Integer rules; fixes #6111
Ian Lynagh [Wed, 27 Jun 2012 20:49:57 +0000 (21:49 +0100)] 
Add some more Integer rules; fixes #6111

7 years agoFix PA dfun construction with silent superclass args
Manuel M T Chakravarty [Wed, 27 Jun 2012 10:39:09 +0000 (20:39 +1000)] 
Fix PA dfun construction with silent superclass args

7 years agoAdd silent superclass parameters to the vectoriser
Manuel M T Chakravarty [Wed, 27 Jun 2012 03:54:12 +0000 (13:54 +1000)] 
Add silent superclass parameters to the vectoriser

7 years agoAdd silent superclass parameters (again)
Simon Peyton Jones [Sun, 27 May 2012 21:31:43 +0000 (22:31 +0100)] 
Add silent superclass parameters (again)

Silent superclass parameters solve the problem that
the superclasses of a dicionary construction can easily
turn out to be (wrongly) bottom.  The problem and solution
are described in
   Note [Silent superclass arguments] in TcInstDcls

I first implemented this fix (with Dimitrios) in Dec 2010, but removed
it again in Jun 2011 becuase we thought it wasn't necessary any
more. (The reason we thought it wasn't necessary is that we'd stopped
generating derived superclass constraints for *wanteds*.  But we were
wrong; that didn't solve the superclass-loop problem.)

So we have to re-implement it.  It's not hard.  Main features:

  * The IdDetails for a DFunId says how many silent arguments it has

  * A DFunUnfolding describes which dictionary args are
    just parameters (DFunLamArg) and which are a function to apply
    to the parameters (DFunPolyArg).  This adds the DFunArg type
    to CoreSyn

  * Consequential changes to IfaceSyn.  (Binary hi file format changes
    slightly.)

  * TcInstDcls changes to generate the right dfuns

  * CoreSubst.exprIsConApp_maybe handles the new DFunUnfolding

The thing taht is *not* done yet is to alter the vectoriser to
pass the relevant extra argument when building a PA dictionary.

7 years agoMention Generic1 in the user's guide
Jose Pedro Magalhaes [Tue, 26 Jun 2012 14:07:20 +0000 (15:07 +0100)] 
Mention Generic1 in the user's guide

7 years agoMake the GHC API a little more powerful.
David Terei [Tue, 26 Jun 2012 00:33:05 +0000 (17:33 -0700)] 
Make the GHC API a little more powerful.

7 years agotweak llvm version warning message
David Terei [Mon, 25 Jun 2012 19:17:41 +0000 (12:17 -0700)] 
tweak llvm version warning message

7 years agoNew version of the patch for #5461.
Paolo Capriotti [Mon, 25 Jun 2012 12:45:03 +0000 (13:45 +0100)] 
New version of the patch for #5461.

7 years agoFix Word64ToInteger conversion rule.
Paolo Capriotti [Mon, 25 Jun 2012 10:31:52 +0000 (11:31 +0100)] 
Fix Word64ToInteger conversion rule.

7 years agoImplemented feature request on reconfigurable pretty-printing in GHCi (#5461)
Vitaly Bragilesky [Thu, 21 Jun 2012 08:26:29 +0000 (12:26 +0400)] 
Implemented feature request on reconfigurable pretty-printing in GHCi (#5461)

7 years agoUse errorMsg over putMsg when appropriate.
David Terei [Mon, 25 Jun 2012 08:43:04 +0000 (01:43 -0700)] 
Use errorMsg over putMsg when appropriate.

7 years agoWarn if using unsupported version of LLVM.
David Terei [Mon, 25 Jun 2012 08:42:44 +0000 (01:42 -0700)] 
Warn if using unsupported version of LLVM.

7 years agoFix #6158. LLVM 3.1 doesn't like certain constructions that 3.0 and
David Terei [Mon, 25 Jun 2012 07:51:47 +0000 (00:51 -0700)] 
Fix #6158. LLVM 3.1 doesn't like certain constructions that 3.0 and
earlier did, so we avoid them.

7 years agoRemove the ID Monad
Ian Lynagh [Sat, 23 Jun 2012 01:18:22 +0000 (02:18 +0100)] 
Remove the ID Monad

We don't use it, and if we want an identity Monad then there's one
in transformers:Data.Functor.Identity that we could use.

7 years agoRemove sortLe uses
Ian Lynagh [Fri, 22 Jun 2012 22:06:38 +0000 (23:06 +0100)] 
Remove sortLe uses

7 years agoRemove sortLe
Ian Lynagh [Fri, 22 Jun 2012 21:46:03 +0000 (22:46 +0100)] 
Remove sortLe

We now use Data.List's sort(By)

7 years agoRemove another use of sortLe
Ian Lynagh [Fri, 22 Jun 2012 21:42:19 +0000 (22:42 +0100)] 
Remove another use of sortLe

7 years agoCorrect a comment
Ian Lynagh [Fri, 22 Jun 2012 21:38:28 +0000 (22:38 +0100)] 
Correct a comment

7 years agoRemove a few more sortLe's
Ian Lynagh [Fri, 22 Jun 2012 21:31:24 +0000 (22:31 +0100)] 
Remove a few more sortLe's

7 years agoRemove another sortLe use
Ian Lynagh [Fri, 22 Jun 2012 21:27:05 +0000 (22:27 +0100)] 
Remove another sortLe use

7 years agoUse a derived Ord instance for Discr
Ian Lynagh [Fri, 22 Jun 2012 21:20:14 +0000 (22:20 +0100)] 
Use a derived Ord instance for Discr

Our hand-written leAlt behaved differently when given a micture of
constructors, but I think that either it won't make a difference or
that this will be an improvement.

7 years agoDerive Eq Discr
Ian Lynagh [Fri, 22 Jun 2012 21:18:32 +0000 (22:18 +0100)] 
Derive Eq Discr

We had effectively hand-written the instance instead

7 years agoChange more uses of sortLe to sortBy
Ian Lynagh [Fri, 22 Jun 2012 20:55:49 +0000 (21:55 +0100)] 
Change more uses of sortLe to sortBy

7 years agoRemove some uses of sortLe
Ian Lynagh [Fri, 22 Jun 2012 19:48:48 +0000 (20:48 +0100)] 
Remove some uses of sortLe

Technically the behaviour of sortWith has changed, as it used
    x `le` y = get_key x < get_key y
(note "<" rather than "<="), but I assume that that was just a mistake.

7 years agoRemove some more unused functions
Ian Lynagh [Fri, 22 Jun 2012 19:27:08 +0000 (20:27 +0100)] 
Remove some more unused functions

7 years agoRemove a GHC 6.4 workaround
Ian Lynagh [Fri, 22 Jun 2012 18:40:50 +0000 (19:40 +0100)] 
Remove a GHC 6.4 workaround

7 years agoRemove 'on' from Util
Ian Lynagh [Fri, 22 Jun 2012 18:17:17 +0000 (19:17 +0100)] 
Remove 'on' from Util

We can now rely on it being available from Data.Function

7 years agoRemove some more unused function from ListSetOps
Ian Lynagh [Fri, 22 Jun 2012 18:14:56 +0000 (19:14 +0100)] 
Remove some more unused function from ListSetOps

7 years agoRemove an unused function
Ian Lynagh [Fri, 22 Jun 2012 18:03:29 +0000 (19:03 +0100)] 
Remove an unused function

7 years agoRemove duplicated comment
Jose Pedro Magalhaes [Thu, 21 Jun 2012 11:23:34 +0000 (12:23 +0100)] 
Remove duplicated comment

7 years agoAllow deriving Generic1
Jose Pedro Magalhaes [Thu, 21 Jun 2012 11:23:01 +0000 (12:23 +0100)] 
Allow deriving Generic1

This completes the support for generic programming introduced
in GHC 7.2. Generic1 allows defining generic functions that
operate on type containers, such as `fmap`, for instance.

Along the way we have fixed #5936 and #5939, allowing
deriving Generic/Generic1 for data families, and disallowing
deriving Generic/Generic1 for instantiated types.

Most of this patch is Nicolas Frisby's work.

7 years agoAdd --verbose and --help flags to gen_contents_index
Thomas Dziedzic [Thu, 21 Jun 2012 02:31:27 +0000 (21:31 -0500)] 
Add --verbose and --help flags to gen_contents_index

Fixes http://hackage.haskell.org/trac/ghc/ticket/5992

7 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Thu, 21 Jun 2012 07:48:56 +0000 (08:48 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

7 years agoRemove the USAVOURY HACK in simplifyInfer
Simon Peyton Jones [Thu, 21 Jun 2012 07:47:33 +0000 (08:47 +0100)] 
Remove the USAVOURY HACK in simplifyInfer

See the discussion in Trac #4361.  The change fixes
a regression in test IPRun.

7 years agoFix whitespace in cmm/PprCmmDecl.hs
Ian Lynagh [Wed, 20 Jun 2012 16:33:21 +0000 (17:33 +0100)] 
Fix whitespace in cmm/PprCmmDecl.hs

7 years agoRemove some more redundant Platform arguments
Ian Lynagh [Wed, 20 Jun 2012 16:32:50 +0000 (17:32 +0100)] 
Remove some more redundant Platform arguments

7 years agoRemove some more redundant Platform arguments
Ian Lynagh [Wed, 20 Jun 2012 16:19:22 +0000 (17:19 +0100)] 
Remove some more redundant Platform arguments

7 years agoRemove some redundant Platform arguments
Ian Lynagh [Wed, 20 Jun 2012 15:42:12 +0000 (16:42 +0100)] 
Remove some redundant Platform arguments

7 years agoFix whitespace in cmm/PprCmmExpr.hs
Ian Lynagh [Wed, 20 Jun 2012 15:32:51 +0000 (16:32 +0100)] 
Fix whitespace in cmm/PprCmmExpr.hs