ghc.git
8 years agoOs X: With Xcode 4, check for gcc-4.2 also in the setup for binary distributions
Manuel M T Chakravarty [Mon, 1 Aug 2011 01:57:43 +0000 (11:57 +1000)] 
Os X: With Xcode 4, check for gcc-4.2 also in the setup for binary distributions

8 years agoRemove some antiquated C constructs
Ian Lynagh [Mon, 1 Aug 2011 00:07:12 +0000 (01:07 +0100)] 
Remove some antiquated C constructs

Fixes validate on amd64/Linux with:

SRC_CC_OPTS += -Wmissing-parameter-type
SRC_CC_OPTS += -Wold-style-declaration
SRC_CC_OPTS += -Wold-style-definition

8 years agoRevert "Don't build dph for now: it doesn't work (#5360)"
Manuel M T Chakravarty [Sun, 31 Jul 2011 07:37:38 +0000 (17:37 +1000)] 
Revert "Don't build dph for now: it doesn't work (#5360)"

This reverts commit e44c591cac5aba8c7718261275db925bc2db9753.

8 years agoRevert "Fix the workaround for #5360"
Manuel M T Chakravarty [Sun, 31 Jul 2011 07:37:23 +0000 (17:37 +1000)] 
Revert "Fix the workaround for #5360"

This reverts commit 2ad66b597b139ea73830f2aedf564df2b72960e9.

8 years agoFix the use of UniqueFM in the type checker (commit bf5af91ca597666641b8519abc85a3129...
Manuel M T Chakravarty [Sun, 31 Jul 2011 07:29:39 +0000 (17:29 +1000)] 
Fix the use of UniqueFM in the type checker (commit bf5af91ca597666641b8519abc85a31297b30823) to preserve the ordering of contexts

See also http://www.haskell.org/pipermail/cvs-ghc/2011-July/064550.html

8 years agoImplement public interface for GC statistics.
Edward Z. Yang [Sat, 30 Jul 2011 20:02:10 +0000 (16:02 -0400)] 
Implement public interface for GC statistics.

We add a new RTS flag -T for collecting statistics but not giving any
new inputs.  There is one new struct in rts/storage/GC.h: GCStats.  We
add two new global counters current_residency and current_slop, which
are useful for in-program GC statistics.

See GHC.Stats in base for a Haskell interface to this functionality.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
8 years agoFix the workaround for #5360
Ian Lynagh [Sun, 31 Jul 2011 00:45:57 +0000 (01:45 +0100)] 
Fix the workaround for #5360

The build still wasn't going through if you had libraries/dph in your tree.

8 years agoFollow things moving in the integer libraries
Ian Lynagh [Sat, 30 Jul 2011 19:30:38 +0000 (20:30 +0100)] 
Follow things moving in the integer libraries

8 years agoDon't build dph for now: it doesn't work (#5360)
Ian Lynagh [Sat, 30 Jul 2011 15:56:26 +0000 (16:56 +0100)] 
Don't build dph for now: it doesn't work (#5360)

8 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Fri, 29 Jul 2011 15:20:33 +0000 (16:20 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

8 years agoComments, plus export TrieMap(..)
Simon Peyton Jones [Fri, 29 Jul 2011 15:09:15 +0000 (16:09 +0100)] 
Comments, plus export TrieMap(..)

8 years agoAdd CoreMonad.reinitializeGlobals so plugins can work around linker issues
Max Bolingbroke [Fri, 29 Jul 2011 11:05:46 +0000 (12:05 +0100)] 
Add CoreMonad.reinitializeGlobals so plugins can work around linker issues

When a plugin is loaded, it currently gets linked against a *newly loaded* copy
of the GHC package. This would not be a problem, except that the new copy has its
own mutable state that is not shared with that state that has already been initialized by
the original GHC package.

This leads to loaded plugins calling GHC code which pokes the static flags,
and then dying with a panic because the static flags *it* sees are uninitialized.

There are two possible solutions:
  1. Export the symbols from the GHC executable from the GHC library and link
     against this existing copy rather than a new copy of the GHC library
  2. Carefully ensure that the global state in the two copies of the GHC
     library matches

I tried 1. and it *almost* works (and speeds up plugin load times!) except
on Windows. On Windows the GHC library tends to export more than 65536 symbols
(see #5292) which overflows the limit of what we can export from the EXE and
causes breakage.

(Note that if the GHC exeecutable was dynamically linked this wouldn't be a problem,
because we could share the GHC library it links to.)

We are going to try 2. instead. Unfortunately, this means that every plugin
will have to say `reinitializeGlobals` before it does anything, but never mind.

I've threaded the cr_globals through CoreM rather than giving them as an
argument to the plugin function so that we can turn this function into
(return ()) without breaking any plugins when we eventually get 1. working.

8 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Fri, 29 Jul 2011 11:18:05 +0000 (12:18 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

8 years agoMake the constraint solver use UniqFMs (ultimately Data.IntMap)
Simon Peyton Jones [Fri, 29 Jul 2011 11:17:33 +0000 (12:17 +0100)] 
Make the constraint solver use UniqFMs (ultimately Data.IntMap)
rather than Data.Map.  It's more efficient that way!

8 years agoDon't make -dppr-debug nuke discardWarnings
Simon Peyton Jones [Fri, 29 Jul 2011 11:16:53 +0000 (12:16 +0100)] 
Don't make -dppr-debug nuke discardWarnings

8 years agoUse the new TrieMap to improve CSE
Simon Peyton Jones [Fri, 29 Jul 2011 11:15:15 +0000 (12:15 +0100)] 
Use the new TrieMap to improve CSE

For CSE it's obviously great to have a mapping whose
key is an expression.  This patch makes CSE use the
new CoreTrie data type.

I did some very simple performance comparisions. The
change in compile-time allocation is less than 1%,
but it does go down!  Slightly.

8 years agoAdd new TrieMap module
Simon Peyton Jones [Fri, 29 Jul 2011 11:10:12 +0000 (12:10 +0100)] 
Add new TrieMap module

This lets you make efficent finite mappings whose
keys are  CoreExpr
          Type
  Coercion
  lists
  maybes

This is useful for CSE, and maybe elsewhere.  I've
been wanting to do this for some time, just for fun,
and it worked out quite nicely.  The code is fairly
boiler-plate-ish, so it's easy to add new key types.

8 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Fri, 29 Jul 2011 10:21:50 +0000 (11:21 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

8 years agoRemove unnecessary import (Windows only)
Simon Peyton Jones [Fri, 29 Jul 2011 10:19:00 +0000 (11:19 +0100)] 
Remove unnecessary import (Windows only)

8 years agoWe no longer need to mark Entry as local or not
Max Bolingbroke [Fri, 29 Jul 2011 09:08:33 +0000 (10:08 +0100)] 
We no longer need to mark Entry as local or not

8 years agoRemove last use of entryLblToInfoLbl
Max Bolingbroke [Fri, 29 Jul 2011 08:32:58 +0000 (09:32 +0100)] 
Remove last use of entryLblToInfoLbl

8 years agoCommon up uses of entryLblToInfoLbl in CmmProcPoint
Max Bolingbroke [Fri, 29 Jul 2011 08:18:38 +0000 (09:18 +0100)] 
Common up uses of entryLblToInfoLbl in CmmProcPoint

8 years agoComments about _info and _closure labels
Simon Peyton Jones [Fri, 29 Jul 2011 08:02:49 +0000 (09:02 +0100)] 
Comments about _info and _closure labels

8 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Fri, 29 Jul 2011 06:49:10 +0000 (07:49 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

8 years agoEliminate cvtToSRTLbl (dead code)
Max Bolingbroke [Thu, 28 Jul 2011 22:58:39 +0000 (23:58 +0100)] 
Eliminate cvtToSRTLbl (dead code)

8 years agoEliminate localiseLabel
Max Bolingbroke [Thu, 28 Jul 2011 22:57:55 +0000 (23:57 +0100)] 
Eliminate localiseLabel

8 years agoEliminate infoLblToEntryLbl
Max Bolingbroke [Thu, 28 Jul 2011 22:52:31 +0000 (23:52 +0100)] 
Eliminate infoLblToEntryLbl

8 years agoThere is only one flavour of LFBlackHole: make that explicit
Max Bolingbroke [Thu, 28 Jul 2011 22:40:36 +0000 (23:40 +0100)] 
There is only one flavour of LFBlackHole: make that explicit

8 years agoPut the info CLabel in CmmInfoTable rather than a localness flag, tidy up some info...
Max Bolingbroke [Thu, 28 Jul 2011 22:37:55 +0000 (23:37 +0100)] 
Put the info CLabel in CmmInfoTable rather than a localness flag, tidy up some info<->entry conversions

8 years agoRepair sanity of infoTableLabelFromCI in old code generator
Max Bolingbroke [Thu, 28 Jul 2011 18:57:27 +0000 (19:57 +0100)] 
Repair sanity of infoTableLabelFromCI in old code generator

8 years agoExchange noinline/inlanable links to match text
Daniel Fischer [Wed, 27 Jul 2011 19:39:44 +0000 (21:39 +0200)] 
Exchange noinline/inlanable links to match text

8 years agoFix the permissions of all the package.conf.d files when installing
Ian Lynagh [Thu, 28 Jul 2011 15:03:13 +0000 (16:03 +0100)] 
Fix the permissions of all the package.conf.d files when installing

Fixes trac #5311.

8 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Thu, 28 Jul 2011 07:16:23 +0000 (08:16 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

8 years agoAdd "alter" functions to UniqFM, VarEnv, NameEnv
Simon Peyton Jones [Thu, 28 Jul 2011 07:15:27 +0000 (08:15 +0100)] 
Add "alter" functions to UniqFM, VarEnv, NameEnv

I need these for a trie data structure I'm working on

8 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Ian Lynagh [Wed, 27 Jul 2011 18:57:24 +0000 (19:57 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

8 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Wed, 27 Jul 2011 14:04:44 +0000 (15:04 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

8 years agoDon't fail validate due to warnings in Cabal
Ian Lynagh [Wed, 27 Jul 2011 14:00:21 +0000 (15:00 +0100)] 
Don't fail validate due to warnings in Cabal

Duncan says that Cabal isn't guaranteed to be warning-free.

8 years agoOn OS X x86_64, use "-Wl,-no_pie" and "-Wl,-no_compact_unwind" to avoid linker warnings
Manuel M T Chakravarty [Wed, 27 Jul 2011 13:05:01 +0000 (23:05 +1000)] 
On OS X x86_64, use "-Wl,-no_pie" and "-Wl,-no_compact_unwind" to avoid linker warnings

- "-Wl,-no_pie" can be removed once GMP gets updated

8 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Wed, 27 Jul 2011 12:09:34 +0000 (13:09 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

8 years agoWhite space only
Simon Peyton Jones [Wed, 27 Jul 2011 11:35:40 +0000 (12:35 +0100)] 
White space only

8 years agoWe need a varToCoreExpr, so that coercions appear correctly
Simon Peyton Jones [Wed, 27 Jul 2011 11:35:25 +0000 (12:35 +0100)] 
We need a varToCoreExpr, so that coercions appear correctly

8 years agoRemember to substitute for type and coercion variables in the CSE pass
Simon Peyton Jones [Wed, 27 Jul 2011 11:34:48 +0000 (12:34 +0100)] 
Remember to substitute for type and coercion variables in the CSE pass

8 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Wed, 27 Jul 2011 10:05:30 +0000 (11:05 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

Conflicts:
compiler/coreSyn/CoreSubst.lhs
compiler/rename/RnNames.lhs

8 years agoGive a more helpful src location (Trac #5281)
Simon Peyton Jones [Wed, 27 Jul 2011 09:39:07 +0000 (10:39 +0100)] 
Give a more helpful src location (Trac #5281)

We weren't giving a useful location for the
*implicit* import of Prelude.  Lennart rightly
complained. This fixes it.

8 years agoPrint rules as well as binds in simplOptPgm debug
Simon Peyton Jones [Wed, 27 Jul 2011 09:30:59 +0000 (10:30 +0100)] 
Print rules as well as binds in simplOptPgm debug

8 years agoWhite space and comments
Simon Peyton Jones [Wed, 27 Jul 2011 09:29:43 +0000 (10:29 +0100)] 
White space and comments

8 years agoFix a nasty scoping error in OptCoercion (EtaAllR/L)
Simon Peyton Jones [Wed, 27 Jul 2011 08:41:34 +0000 (09:41 +0100)] 
Fix a nasty scoping error in OptCoercion (EtaAllR/L)

Sing ho for ASSERTs!

8 years agoImprove StgLint -- a bit
Simon Peyton Jones [Wed, 27 Jul 2011 07:45:53 +0000 (08:45 +0100)] 
Improve StgLint -- a bit

This addresses Trac #5345, but only partially.  Fundamentally STG Lint
is impossible, because unsafeCoerce# can randomise all the types.

This patch does a bit of fiddle faddling in StgLint which makes it
a bit better, but it's a losing battle. Trac #5345 works though, FWIW.

8 years agoWhite space only
Simon Peyton Jones [Wed, 27 Jul 2011 05:58:23 +0000 (06:58 +0100)] 
White space only

8 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Wed, 27 Jul 2011 05:57:30 +0000 (06:57 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

8 years agoEliminate the GlomBinds pass
Simon Peyton Jones [Wed, 27 Jul 2011 05:57:06 +0000 (06:57 +0100)] 
Eliminate the GlomBinds pass

It is now done when necessary by OccurAnal
(see Note [Glomming] in OccurAnal)

8 years agoFix let-floating out of Rec blocks
Simon Peyton Jones [Wed, 27 Jul 2011 05:25:45 +0000 (06:25 +0100)] 
Fix let-floating out of Rec blocks

This fixes Trac #5341 and #5342.  The question is about
what to do when floating out of the RHS of a Rec-bound
function, when there's a FloatCase involved.  For FloatLets
they can join the Rec block, but FloatCases can't.  But
we don't want to mess with the arity (that was the bug).
So in this (rather exotic case) we push the FloatCase
back inside any lambdas.

See Note [Floating out of Rec rhss]. It's a slightly ugly fix, but I
can't think of anything better, and I don't think it has any practical
impact.

8 years agoWhite space only
Simon Peyton Jones [Wed, 27 Jul 2011 05:22:40 +0000 (06:22 +0100)] 
White space only

8 years agoFix comments and documentation on monad comprehensions
Simon Peyton Jones [Wed, 27 Jul 2011 05:22:26 +0000 (06:22 +0100)] 
Fix comments and documentation on monad comprehensions

8 years agoA bit of refactoring on handling HsPar and friends
Simon Peyton Jones [Wed, 27 Jul 2011 05:21:43 +0000 (06:21 +0100)] 
A bit of refactoring on handling HsPar and friends

This relates to Trac #4430 (infix expressions in TH),.
Mainly comments but a bit of code wibbling.

8 years agoImprove exprIsConApp_maybe again
Simon Peyton Jones [Wed, 27 Jul 2011 05:19:21 +0000 (06:19 +0100)] 
Improve exprIsConApp_maybe again

Now it handles value lambdas too; and I've dealt with
an out-of-scope error too.

8 years agoOn OS X, use gcc-4.2 with Xcode 4 and up
Manuel M T Chakravarty [Wed, 27 Jul 2011 04:59:22 +0000 (14:59 +1000)] 
On OS X, use gcc-4.2 with Xcode 4 and up

8 years agoMove CoreSyn comments upwards
Max Bolingbroke [Tue, 26 Jul 2011 15:16:07 +0000 (16:16 +0100)] 
Move CoreSyn comments upwards

8 years agoFix docbook syntax in user guide
Ian Lynagh [Sun, 24 Jul 2011 21:34:11 +0000 (22:34 +0100)] 
Fix docbook syntax in user guide

8 years agoThe implementation of "weak loop breakers" was being too clever
Simon Peyton Jones [Mon, 25 Jul 2011 17:01:59 +0000 (18:01 +0100)] 
The implementation of "weak loop breakers" was being too clever

The too-clever-ness meant that a variable could just go out
of scope; this happened in building System.Consol.Haskeline.Backend.Terminfo
in the haskeline library.

This patch makes the weak-loopbreaker computation simpler, and a bit
more conserative; which fixes the bug, and doesn't make any difference
to the code in the end.

8 years agoAdd support for unresolved infix expressions and patterns
Reiner Pope [Sat, 23 Jul 2011 06:15:41 +0000 (16:15 +1000)] 
Add support for unresolved infix expressions and patterns

8 years agoImprove the documentation of the new generic programming mechanism.
Jose Pedro Magalhaes [Mon, 25 Jul 2011 08:57:41 +0000 (10:57 +0200)] 
Improve the documentation of the new generic programming mechanism.

Thanks to David Terei for the comments.

8 years agoRe-engineer exprIsConApp_maybe (fixes Trac #5327)
Simon Peyton Jones [Mon, 25 Jul 2011 08:33:09 +0000 (09:33 +0100)] 
Re-engineer exprIsConApp_maybe (fixes Trac #5327)

The problem with #5327 was like this:
    let x = I# 0 `cast` co1
    in ...(case x `cast` co2 of I# y -> blah)...

The two casts cancelled out, but exprIsConApp_maybe couldn't see
that.  This patch makes it simpler, faster, and more effective.

(Incidentally, usually 'x' would be inlined, in #5327 it wasn't
because of an INLINEABLE pragma and the lone-variable thing.
Instead of fiddling with alrady-delicate code, I just made
exprIsConApp_maybe better.)

8 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Mon, 25 Jul 2011 08:17:42 +0000 (09:17 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

8 years agoRename avg_residency to less misleading cumulative_residency.
Edward Z. Yang [Tue, 19 Jul 2011 15:08:16 +0000 (11:08 -0400)] 
Rename avg_residency to less misleading cumulative_residency.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
8 years agoDon't subtract HC_tot_time when calculating mut_user_time
Ian Lynagh [Sun, 24 Jul 2011 12:14:20 +0000 (13:14 +0100)] 
Don't subtract HC_tot_time when calculating mut_user_time

Heap census now happens during GC, so that time is already accounted
for in GC_tot_cpu.

8 years agoRemove prototype to mut_user_time_during_GC
Ian Lynagh [Sat, 23 Jul 2011 23:07:05 +0000 (00:07 +0100)] 
Remove prototype to mut_user_time_during_GC

The function no longer exists.

8 years agoFix heap profiling times
Ian Lynagh [Sat, 23 Jul 2011 23:01:54 +0000 (00:01 +0100)] 
Fix heap profiling times

Now that the heap census runs in the middle of garbage collections,
the "CPU time" it was calculating included any CPU time used so far
in the current GC. This could cause CPU time to appear to go down,
which means hp2ps complained about "samples out of sequence".

I'm not sure if this is the nicest way to solve this (maybe resurrecting
mut_user_time_during_GC would be better?) but it gets things working again.

8 years agoAdd rules for Integer constant folding
Ian Lynagh [Sat, 23 Jul 2011 20:46:37 +0000 (21:46 +0100)] 
Add rules for Integer constant folding

8 years agoA nice tidy-up for CvSubst and liftCoSubst
Simon Peyton Jones [Sat, 23 Jul 2011 17:36:58 +0000 (18:36 +0100)] 
A nice tidy-up for CvSubst and liftCoSubst

A "lifting substitition" takes a *type* to a *coercion*, using a
substitution that takes a *type variable* to a *coercion*.  We were
using a CvSubst for this purpose, which was an awkward exception: in
every other use of CvSubst, type variables map only to types.

Turned out that Coercion.liftCoSubst is quite a small function, so I
rewrote it with a special substitution type Coercion.LiftCoSubst, just
for that purpose.  In doing so I found that the function itself was
bizarrely over-complicated ... a direct result of mis-using CvSubst.

So this patch makes it all simpler, faster, and easier to understand.
No bugs fixed though!

8 years agoReject bad 'deriving' directives (fixes Trac #5287)
Simon Peyton Jones [Sat, 23 Jul 2011 17:30:46 +0000 (18:30 +0100)] 
Reject bad 'deriving' directives (fixes Trac #5287)

The 'deriving' mechanism that infers the context for
an instance declarations was going into a loop, as a
result of an instance like
       instance C a b => D [a]
where the 'b' isn't mentioned in the head.

This patch identifies those cases.  I also needed to make
TcErrors generate a suitable error message.  On the way
I improved the reporting of "ambiguous" variables;
for example arrowfail001 now generates a better message.

8 years agoFix build
Ian Lynagh [Sat, 23 Jul 2011 14:11:58 +0000 (15:11 +0100)] 
Fix build

8 years agoWhitespace only in prelude/PrelNames.lhs
Ian Lynagh [Sat, 23 Jul 2011 12:22:45 +0000 (13:22 +0100)] 
Whitespace only in prelude/PrelNames.lhs

8 years agoRemove some more dead code
Ian Lynagh [Sat, 23 Jul 2011 12:21:06 +0000 (13:21 +0100)] 
Remove some more dead code

8 years agoRemove some unused IdKeys
Ian Lynagh [Sat, 23 Jul 2011 12:09:46 +0000 (13:09 +0100)] 
Remove some unused IdKeys

8 years agoTweak the typeable fingerprinting
Ian Lynagh [Fri, 22 Jul 2011 22:17:56 +0000 (23:17 +0100)] 
Tweak the typeable fingerprinting

Put spaces inbetween the values, so e.g.
    p:Foobar.baz
    p:Foo.barbaz
will hash differently.

8 years agoSync the typeable fingerprinting with base
Ian Lynagh [Fri, 22 Jul 2011 21:57:16 +0000 (22:57 +0100)] 
Sync the typeable fingerprinting with base

8 years agoRemove dead code
Ian Lynagh [Fri, 22 Jul 2011 19:25:35 +0000 (20:25 +0100)] 
Remove dead code

8 years agoFollow the move of GHC.Classes from base to ghc-prim
Ian Lynagh [Fri, 22 Jul 2011 16:46:54 +0000 (17:46 +0100)] 
Follow the move of GHC.Classes from base to ghc-prim

8 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Fri, 22 Jul 2011 07:57:46 +0000 (08:57 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

8 years agoComments only
Simon Peyton Jones [Fri, 22 Jul 2011 07:57:09 +0000 (08:57 +0100)] 
Comments only

8 years agoImplement a findCycle function in Digraph,
Simon Peyton Jones [Fri, 22 Jul 2011 07:56:42 +0000 (08:56 +0100)] 
Implement a findCycle function in Digraph,
and use it to report module loops nicely

This fixes Trac #5307. Now we get

    Module imports form a cycle:
             module `M8' (.\M8.hs)
            imports `M1' (M1.hs)
      which imports `M9' (.\M9.hs-boot)
      which imports `M8' (.\M8.hs)

And the algorithm is linear time.

8 years agoFix build on OSX, thanks to David Peixotto
Ben Lippmeier [Fri, 22 Jul 2011 05:37:13 +0000 (15:37 +1000)] 
Fix build on OSX, thanks to David Peixotto

8 years agoUpdate safe haskell doc about Data.Typeable
David Terei [Fri, 22 Jul 2011 00:29:18 +0000 (17:29 -0700)] 
Update safe haskell doc about Data.Typeable

8 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Thu, 21 Jul 2011 16:22:47 +0000 (17:22 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

8 years agoshow warning flags in :set (lost in the recent dopt->wopt change,
Simon Marlow [Thu, 21 Jul 2011 13:55:20 +0000 (14:55 +0100)] 
show warning flags in :set (lost in the recent dopt->wopt change,
noticed by test ghci024)

8 years agoneed to release the SM lock around heapCensus() to avoid deadlock with
Simon Marlow [Thu, 21 Jul 2011 13:29:58 +0000 (14:29 +0100)] 
need to release the SM lock around heapCensus() to avoid deadlock with
+RTS -hT and -threaded.

8 years agoone more instance of the 64-bit constant bug I noticed
Simon Marlow [Thu, 21 Jul 2011 13:29:26 +0000 (14:29 +0100)] 
one more instance of the 64-bit constant bug I noticed

8 years agoEta expand partial applications
Simon Peyton Jones [Thu, 21 Jul 2011 11:54:51 +0000 (12:54 +0100)] 
Eta expand partial applications

When we have
     x = \v -> map g
we want to eta-expand to
     x = \v y -> map g y

We weren't doing so, and that led to worse code and,
perhaps, #5285.  I need to check the latter, but I
was certainly seeing one similar error.  Anyway
this looks like a definite improvement

8 years agoSimplify the treatment of RULES in OccurAnal
Simon Peyton Jones [Thu, 21 Jul 2011 11:52:01 +0000 (12:52 +0100)] 
Simplify the treatment of RULES in OccurAnal

I realised that my recently-added cunning stuff about
RULES for imported Ids was simply wrong, so this patch
removes it.   See Note [Rules for imported functions],
which explains it all.

This patch also does quite a bit of refactoring in
the treatment of loop breakers.

8 years agoWhen specialising recursive functions, mark the specialised function NOINLINE
Simon Peyton Jones [Thu, 21 Jul 2011 11:45:51 +0000 (12:45 +0100)] 
When specialising recursive functions, mark the specialised function NOINLINE

This fixes Trac #4903.  See Note [Specialising imported functions] in OccurAnal.

8 years agoChange loop breaker terminology
Simon Peyton Jones [Thu, 21 Jul 2011 11:38:23 +0000 (12:38 +0100)] 
Change loop breaker terminology

We used to have "loop breaker" and "non-rule loop breaker", but
the unqualified version in particualr was pretty confusing.  So
now we have "strong loop breaker" and "weak loop breaker";
comments in BasicTypes and OccurAnal.

8 years agoComments and white space
Simon Peyton Jones [Thu, 21 Jul 2011 11:32:32 +0000 (12:32 +0100)] 
Comments and white space

8 years agoGeneralise the type of minusVarEnv slightly
Simon Peyton Jones [Thu, 21 Jul 2011 11:25:39 +0000 (12:25 +0100)] 
Generalise the type of minusVarEnv slightly

8 years agoImprove debug printing for simplifier counts
Simon Peyton Jones [Thu, 21 Jul 2011 10:09:18 +0000 (11:09 +0100)] 
Improve debug printing for simplifier counts

8 years agoAdd an unregisterised config to build.mk
David Terei [Wed, 20 Jul 2011 23:45:58 +0000 (16:45 -0700)] 
Add an unregisterised config to build.mk

8 years agoEnable derived but not hand crafted Typeable instances in Safe Haskell
David Terei [Wed, 20 Jul 2011 23:28:03 +0000 (16:28 -0700)] 
Enable derived but not hand crafted Typeable instances in Safe Haskell

8 years agoFormat fixes
David Terei [Wed, 20 Jul 2011 23:27:28 +0000 (16:27 -0700)] 
Format fixes

8 years agoFix 'make test' command for new testsuite location
David Terei [Wed, 20 Jul 2011 21:53:40 +0000 (14:53 -0700)] 
Fix 'make test' command for new testsuite location

8 years agoUpdate some files for new testsuite tests location
David Terei [Wed, 20 Jul 2011 21:46:54 +0000 (14:46 -0700)] 
Update some files for new testsuite tests location