ghc.git
11 years agobump GHC's max stack size to 512M
Simon Marlow [Fri, 19 Dec 2008 11:22:11 +0000 (11:22 +0000)] 
bump GHC's max stack size to 512M
To accomodate compiling very long static lists (#2002)

11 years agoext-core: change .cabal file so we can build with either GHC 6.8 or 6.10
Tim Chevalier [Mon, 5 Jan 2009 19:27:57 +0000 (19:27 +0000)] 
ext-core: change .cabal file so we can build with either GHC 6.8 or 6.10

11 years agoext-core: fix some Prep bugs
Tim Chevalier [Mon, 5 Jan 2009 19:27:34 +0000 (19:27 +0000)] 
ext-core: fix some Prep bugs

11 years agoext-core: use shorter names when combining modules
Tim Chevalier [Mon, 5 Jan 2009 19:26:45 +0000 (19:26 +0000)] 
ext-core: use shorter names when combining modules

11 years agoext-core: twiddle primitive things
Tim Chevalier [Mon, 5 Jan 2009 19:24:34 +0000 (19:24 +0000)] 
ext-core: twiddle primitive things

11 years agoDon't pin a register for gc_thread on SPARC.
Ben.Lippmeier@anu.edu.au [Mon, 5 Jan 2009 03:07:58 +0000 (03:07 +0000)] 
Don't pin a register for gc_thread on SPARC.

This makes the build work again.

11 years agoRequire HsColour by default
Ian Lynagh [Sun, 4 Jan 2009 21:46:47 +0000 (21:46 +0000)] 
Require HsColour by default
This should stop us ending up without HsColour'ed sources on some
platforms.

We also now tell Cabal where to find HsColour, rather than it finding
it itself.

11 years agoFix build
Ian Lynagh [Sun, 4 Jan 2009 21:18:10 +0000 (21:18 +0000)] 
Fix build

11 years agoAdd GHCi completions to :set and :show
Ori Avtalion [Tue, 9 Dec 2008 19:42:10 +0000 (19:42 +0000)] 
Add GHCi completions to :set and :show

11 years agoFix sync-all: Check for --complete/partial before --<anything>
Ian Lynagh [Sun, 4 Jan 2009 18:46:52 +0000 (18:46 +0000)] 
Fix sync-all: Check for --complete/partial before --<anything>
Patch from megacz in trac #2857

11 years agoRemove time from extralibs at request of maintainer
Ian Lynagh [Sun, 4 Jan 2009 11:55:09 +0000 (11:55 +0000)] 
Remove time from extralibs at request of maintainer

11 years agovalidate fix: InteractiveEval no longer needs to import IdInfo
Ian Lynagh [Sat, 3 Jan 2009 15:47:54 +0000 (15:47 +0000)] 
validate fix: InteractiveEval no longer needs to import  IdInfo

11 years agoFix validate: strs is no longer used in IfaceSyn
Ian Lynagh [Sat, 3 Jan 2009 15:36:24 +0000 (15:36 +0000)] 
Fix validate: strs is no longer used in IfaceSyn

11 years agoRemove trailing whitespace from HaddockUtils
Ian Lynagh [Mon, 29 Dec 2008 19:17:27 +0000 (19:17 +0000)] 
Remove trailing whitespace from HaddockUtils

11 years agoFix warnings in HaddockUtils
Ian Lynagh [Mon, 29 Dec 2008 19:16:57 +0000 (19:16 +0000)] 
Fix warnings in HaddockUtils

11 years agoRemove dead code from HaddockUtils
Ian Lynagh [Mon, 29 Dec 2008 19:14:30 +0000 (19:14 +0000)] 
Remove dead code from HaddockUtils

11 years agoMake record selectors into ordinary functions
simonpj@microsoft.com [Fri, 2 Jan 2009 14:28:51 +0000 (14:28 +0000)] 
Make record selectors into ordinary functions

This biggish patch addresses Trac #2670.  The main effect is to make
record selectors into ordinary functions, whose unfoldings appear in
interface files, in contrast to their previous existence as magic
"implicit Ids".  This means that the usual machinery of optimisation,
analysis, and inlining applies to them, which was failing before when
the selector was somewhat complicated.  (Which it can be when
strictness annotations, unboxing annotations, and GADTs are involved.)

The change involves the following points

* Changes in Var.lhs to the representation of Var.  Now a LocalId can
  have an IdDetails as well as a GlobalId.  In particular, the
  information that an Id is a record selector is kept in the
  IdDetails.  While compiling the current module, the record selector
  *must* be a LocalId, so that it participates properly in compilation
  (free variables etc).

  This led me to change the (hidden) representation of Var, so that there
  is now only one constructor for Id, not two.

* The IdDetails is persisted into interface files, so that an
  importing module can see which Ids are records selectors.

* In TcTyClDecls, we generate the record-selector bindings in renamed,
  but not typechecked form.  In this way, we can get the typechecker
  to add all the types and so on, which is jolly helpful especially
  when GADTs or type families are involved.  Just like derived
  instance declarations.

  This is the big new chunk of 180 lines of code (much of which is
  commentary).  A call to the same function, mkAuxBinds, is needed in
  TcInstDcls for associated types.

* The typechecker therefore has to pin the correct IdDetails on to
  the record selector, when it typechecks it.  There was a neat way
  to do this, by adding a new sort of signature to HsBinds.Sig, namely
  IdSig.  This contains an Id (with the correct Name, Type, and IdDetails);
  the type checker uses it as the binder for the final binding.  This
  worked out rather easily.

* Record selectors are no longer "implicit ids", which entails changes to
     IfaceSyn.ifaceDeclSubBndrs
     HscTypes.implicitTyThings
     TidyPgm.getImplicitBinds
  (These three functions must agree.)

* MkId.mkRecordSelectorId is deleted entirely, some 300+ lines (incl
  comments) of very error prone code.  Happy days.

* A TyCon no longer contains the list of record selectors:
  algTcSelIds is gone

The renamer is unaffected, including the way that import and export of
record selectors is handled.

Other small things

* IfaceSyn.ifaceDeclSubBndrs had a fragile test for whether a data
  constructor had a wrapper.  I've replaced that with an explicit flag
  in the interface file. More robust I hope.

* I renamed isIdVar to isId, which touched a few otherwise-unrelated files.

11 years agoFix Trac #2721: reject newtype deriving if the class has associated types
simonpj@microsoft.com [Wed, 31 Dec 2008 16:43:00 +0000 (16:43 +0000)] 
Fix Trac #2721: reject newtype deriving if the class has associated types

11 years ago-XImpredicativeTypes implies -XRankNTypes, and improve error msg in TcMType
simonpj@microsoft.com [Wed, 31 Dec 2008 15:25:17 +0000 (15:25 +0000)] 
-XImpredicativeTypes implies -XRankNTypes, and improve error msg in TcMType

If you are going for impredicative types you almost certainly want RankN
too. The change to TcMType improves the error when you say
     T (forall a. blah)
where T is a type synonym.  This doesn't necessarily need impredicativity,
if you have LiberalTypeSynonyms.

11 years agoFix Trac #2856: make deriving work for type families
simonpj@microsoft.com [Wed, 31 Dec 2008 14:41:51 +0000 (14:41 +0000)] 
Fix Trac #2856: make deriving work for type families

Darn, but TcDeriv is complicated, when type families get in on
the act!  This patch makes GeneralisedNewtypeDeriving work
properly for type families.  I think.

In order to do so, I found that GeneralisedNewtypeDeriving can
work for recursive newtypes too -- and since families are conservatively
marked recursive, that's a crucial part of the fix, and useful too.
See Note [Recursive newtypes] in TcDeriv.

11 years agoWhite space and spelling in comments
simonpj@microsoft.com [Wed, 31 Dec 2008 14:41:31 +0000 (14:41 +0000)] 
White space and spelling in comments

11 years agoRemove -XImpredicativeTypes from -fglasgow-exts
simonpj@microsoft.com [Wed, 31 Dec 2008 14:40:06 +0000 (14:40 +0000)] 
Remove -XImpredicativeTypes from -fglasgow-exts

See Trac #2846: impredicative types are far from stable, so
-fglasgow-exts should not imply them.  Maybe we should merge
this into 6.10?

11 years agoImprove error reporting for 'deriving'
simonpj@microsoft.com [Wed, 31 Dec 2008 14:35:21 +0000 (14:35 +0000)] 
Improve error reporting for 'deriving'

a) Improve the extra suggested fix when there's a "no instance"
   error in a deriving clause.

b) Improve error location recording in tcInstDecl2

Many of the changes in tcInstDecl2 are simple reformatting.

11 years agoImprove error message in deriving (fix Trac #2851)
simonpj@microsoft.com [Tue, 30 Dec 2008 16:59:06 +0000 (16:59 +0000)] 
Improve error message in deriving (fix Trac #2851)

11 years agoAvoid nasty name clash with associated data types (fixes Trac #2888)
simonpj@microsoft.com [Tue, 30 Dec 2008 16:44:32 +0000 (16:44 +0000)] 
Avoid nasty name clash with associated data types (fixes Trac #2888)

The main bug was in TcHsType; see Note [Avoid name clashes for
associated data types].  However I did a bit of re-factoring while
I was abouut it.

I'm still a but unhappy with the use of TyCon.setTyConArgPoss; it'd
be better to construct the TyCon correctly in the first place.  But
that means passing an extra parameter to tcTyDecl1... maybe we should
do this.

11 years agoRefactor RnEnv to fix Trac #2901
simonpj@microsoft.com [Tue, 30 Dec 2008 15:04:45 +0000 (15:04 +0000)] 
Refactor RnEnv to fix Trac #2901

This tidy-up fixes Trac #2901, and eliminates 20 lines of code.
Mainly this is done by making a version of lookupGlobalOccRn that
returns (Maybe Name); this replaces lookupSrcOccRn but does more.

11 years agoAdd quotes to error message
simonpj@microsoft.com [Tue, 30 Dec 2008 15:04:02 +0000 (15:04 +0000)] 
Add quotes to error message

11 years agoTidy up treatment of big lambda (fixes Trac #2898)
simonpj@microsoft.com [Tue, 30 Dec 2008 14:59:48 +0000 (14:59 +0000)] 
Tidy up treatment of big lambda (fixes Trac #2898)

There was a leftover big lambda in the CorePrep'd code, which confused
the bytecode generator.  Actually big lambdas are harmless.  This patch
refactors ByteCodeGen so that it systemantically used 'bcView' to eliminate
junk.  I did a little clean up in CorePrep too.

See comments in Trac #2898.

11 years agoFix warnings in ByteCodeAsm
Ian Lynagh [Mon, 29 Dec 2008 17:47:26 +0000 (17:47 +0000)] 
Fix warnings in ByteCodeAsm

11 years agoFix warnings in ByteCodeInstr
Ian Lynagh [Mon, 29 Dec 2008 17:33:31 +0000 (17:33 +0000)] 
Fix warnings in ByteCodeInstr

11 years agoFix warnings in Rules
Ian Lynagh [Mon, 29 Dec 2008 17:18:32 +0000 (17:18 +0000)] 
Fix warnings in Rules

11 years agoFix warnings in StgCmmForeign
Ian Lynagh [Mon, 29 Dec 2008 16:59:57 +0000 (16:59 +0000)] 
Fix warnings in StgCmmForeign

11 years agoFix warnings in CgCallConv
Ian Lynagh [Mon, 29 Dec 2008 16:54:02 +0000 (16:54 +0000)] 
Fix warnings in CgCallConv

11 years agoFix warnings in SMRep
Ian Lynagh [Mon, 29 Dec 2008 16:49:59 +0000 (16:49 +0000)] 
Fix warnings in SMRep

11 years agoFix warnings in ClosureInfo
Ian Lynagh [Mon, 29 Dec 2008 16:46:18 +0000 (16:46 +0000)] 
Fix warnings in ClosureInfo

11 years agoFix warnings in CgTicky
Ian Lynagh [Mon, 29 Dec 2008 15:34:16 +0000 (15:34 +0000)] 
Fix warnings in CgTicky

11 years agoFix warnings in CgCon
Ian Lynagh [Mon, 29 Dec 2008 15:17:33 +0000 (15:17 +0000)] 
Fix warnings in CgCon

11 years agoFix warnings in WorkWrap
Ian Lynagh [Mon, 29 Dec 2008 15:04:06 +0000 (15:04 +0000)] 
Fix warnings in WorkWrap

11 years agoFix warnings in NCGMonad
Ian Lynagh [Mon, 29 Dec 2008 14:56:27 +0000 (14:56 +0000)] 
Fix warnings in NCGMonad

11 years agoFix warnings in CmmInfo
Ian Lynagh [Mon, 29 Dec 2008 14:53:07 +0000 (14:53 +0000)] 
Fix warnings in CmmInfo

11 years agoFix warnings in CmmCPSGen
Ian Lynagh [Mon, 29 Dec 2008 14:51:19 +0000 (14:51 +0000)] 
Fix warnings in CmmCPSGen

11 years agoFix warnings in CmmProcPoint
Ian Lynagh [Mon, 29 Dec 2008 14:42:14 +0000 (14:42 +0000)] 
Fix warnings in CmmProcPoint

11 years agoFix warnings in CmmCallConv
Ian Lynagh [Mon, 29 Dec 2008 14:19:24 +0000 (14:19 +0000)] 
Fix warnings in CmmCallConv

11 years agoFix warnings in CmmLive
Ian Lynagh [Mon, 29 Dec 2008 14:10:35 +0000 (14:10 +0000)] 
Fix warnings in CmmLive

11 years agoFix warnings in CmmCPS
Ian Lynagh [Mon, 29 Dec 2008 13:31:58 +0000 (13:31 +0000)] 
Fix warnings in CmmCPS

11 years agoFix warnings in CmmUtils
Ian Lynagh [Mon, 29 Dec 2008 13:26:37 +0000 (13:26 +0000)] 
Fix warnings in CmmUtils

11 years agoComment out dead function breakProc
Ian Lynagh [Mon, 29 Dec 2008 11:56:47 +0000 (11:56 +0000)] 
Comment out dead function breakProc

11 years agoFix warnings in CmmBrokenBlock
Ian Lynagh [Mon, 29 Dec 2008 11:55:27 +0000 (11:55 +0000)] 
Fix warnings in CmmBrokenBlock

11 years agoComments only. Haddockify parts of TcRnTypes.
Thomas Schilling [Thu, 11 Dec 2008 15:46:57 +0000 (15:46 +0000)] 
Comments only.  Haddockify parts of TcRnTypes.

11 years agoComments only. Fix typo.
Thomas Schilling [Thu, 11 Dec 2008 15:31:04 +0000 (15:31 +0000)] 
Comments only.  Fix typo.

11 years agoInclude PprTyThings in tags file.
Thomas Schilling [Thu, 11 Dec 2008 15:30:05 +0000 (15:30 +0000)] 
Include PprTyThings in tags file.

11 years agoUse DynFlags to work out if we are doing ticky ticky profiling
Ian Lynagh [Thu, 18 Dec 2008 16:19:28 +0000 (16:19 +0000)] 
Use DynFlags to work out if we are doing ticky ticky profiling
We used to use StaticFlags

11 years agoFix warnings in CgExpr
Ian Lynagh [Wed, 17 Dec 2008 20:11:52 +0000 (20:11 +0000)] 
Fix warnings in CgExpr

11 years agoFix warnings in CgBindery
Ian Lynagh [Wed, 17 Dec 2008 19:46:07 +0000 (19:46 +0000)] 
Fix warnings in CgBindery

11 years agoFix warnings in CgStackery
Ian Lynagh [Wed, 17 Dec 2008 19:17:13 +0000 (19:17 +0000)] 
Fix warnings in CgStackery

11 years agoFix warnings in CgCase
Ian Lynagh [Wed, 17 Dec 2008 19:08:48 +0000 (19:08 +0000)] 
Fix warnings in CgCase

11 years agoRemove some dead code from CgCase
Ian Lynagh [Wed, 17 Dec 2008 18:47:55 +0000 (18:47 +0000)] 
Remove some dead code from CgCase

11 years agoFix warnings in StgCmmProf
Ian Lynagh [Wed, 17 Dec 2008 18:22:36 +0000 (18:22 +0000)] 
Fix warnings in StgCmmProf

11 years agoFix warnings in CgProf
Ian Lynagh [Wed, 17 Dec 2008 18:17:11 +0000 (18:17 +0000)] 
Fix warnings in CgProf

11 years agoFix warnings in CgInfoTbls
Ian Lynagh [Wed, 17 Dec 2008 18:01:44 +0000 (18:01 +0000)] 
Fix warnings in CgInfoTbls

11 years agoRemove dead function srtLabelAndLength from CgInfoTbls
Ian Lynagh [Wed, 17 Dec 2008 18:00:44 +0000 (18:00 +0000)] 
Remove dead function srtLabelAndLength from CgInfoTbls

11 years agoFix warnings in CgHeapery
Ian Lynagh [Wed, 17 Dec 2008 17:57:26 +0000 (17:57 +0000)] 
Fix warnings in CgHeapery

11 years agoFix warnings in CgTailCall
Ian Lynagh [Wed, 17 Dec 2008 17:50:40 +0000 (17:50 +0000)] 
Fix warnings in CgTailCall

11 years agoRemove a little dead code from CgTailCall
Ian Lynagh [Wed, 17 Dec 2008 17:49:47 +0000 (17:49 +0000)] 
Remove a little dead code from CgTailCall

11 years agoFix warnings in CodeGen
Ian Lynagh [Wed, 17 Dec 2008 16:59:04 +0000 (16:59 +0000)] 
Fix warnings in CodeGen

11 years agoFix warnings in StgCmmTicky
Ian Lynagh [Wed, 17 Dec 2008 16:54:33 +0000 (16:54 +0000)] 
Fix warnings in StgCmmTicky

11 years agoRemove dead code from CgUtils
Ian Lynagh [Wed, 17 Dec 2008 16:39:20 +0000 (16:39 +0000)] 
Remove dead code from CgUtils

11 years agoFix warnings in CgPrimOp
Ian Lynagh [Wed, 17 Dec 2008 16:39:12 +0000 (16:39 +0000)] 
Fix warnings in CgPrimOp

11 years agoFix warnings in CgMonad
Ian Lynagh [Wed, 17 Dec 2008 16:39:03 +0000 (16:39 +0000)] 
Fix warnings in CgMonad

11 years agoFix warnings in CgClosure
Ian Lynagh [Wed, 17 Dec 2008 16:38:50 +0000 (16:38 +0000)] 
Fix warnings in CgClosure

11 years agoFix warnings in CgForeignCall
Ian Lynagh [Mon, 15 Dec 2008 22:25:15 +0000 (22:25 +0000)] 
Fix warnings in CgForeignCall

11 years agoRemove some redundant code
Ian Lynagh [Mon, 15 Dec 2008 19:40:47 +0000 (19:40 +0000)] 
Remove some redundant code
We were looking at opt_DoTickyProfiling, and if it was set claling ifTicky
which looks at opt_DoTickyProfiling itself.

11 years agoFix warnings in CgLetNoEscape
Ian Lynagh [Mon, 15 Dec 2008 17:37:52 +0000 (17:37 +0000)] 
Fix warnings in CgLetNoEscape

11 years agoWorkaround for #2262, from Barney Stratford
Simon Marlow [Tue, 16 Dec 2008 12:47:06 +0000 (12:47 +0000)] 
Workaround for #2262, from Barney Stratford
See http://www.haskell.org/pipermail/glasgow-haskell-users/2008-December/016333.html

11 years agoUNDO: Add -fpass-case-bndr-to-join-points
Simon Marlow [Tue, 16 Dec 2008 11:42:35 +0000 (11:42 +0000)] 
UNDO: Add -fpass-case-bndr-to-join-points

rolling back:

Fri Dec  5 10:51:59 GMT 2008  simonpj@microsoft.com
  * Add -fpass-case-bndr-to-join-points

  See Note [Passing the case binder to join points] in Simplify.lhs
  The default now is *not* to pass the case binder.  There are some
  nofib results with the above note; the effect is almost always
  negligible.

  I don't expect this flag to be used by users (hence no docs). It's just
  there to let me try the performance effects of switching on and off.

    M ./compiler/main/StaticFlagParser.hs +1
    M ./compiler/main/StaticFlags.hs +4
    M ./compiler/simplCore/Simplify.lhs -14 +73

11 years agoRollback INLINE patches
Simon Marlow [Tue, 16 Dec 2008 10:35:56 +0000 (10:35 +0000)] 
Rollback INLINE patches

rolling back:

Fri Dec  5 16:54:00 GMT 2008  simonpj@microsoft.com
  * Completely new treatment of INLINE pragmas (big patch)

  This is a major patch, which changes the way INLINE pragmas work.
  Although lots of files are touched, the net is only +21 lines of
  code -- and I bet that most of those are comments!

  HEADS UP: interface file format has changed, so you'll need to
  recompile everything.

  There is not much effect on overall performance for nofib,
  probably because those programs don't make heavy use of INLINE pragmas.

          Program           Size    Allocs   Runtime   Elapsed
              Min         -11.3%     -6.9%     -9.2%     -8.2%
              Max          -0.1%     +4.6%     +7.5%     +8.9%
   Geometric Mean          -2.2%     -0.2%     -1.0%     -0.8%

  (The +4.6% for on allocs is cichelli; see other patch relating to
  -fpass-case-bndr-to-join-points.)

  The old INLINE system
  ~~~~~~~~~~~~~~~~~~~~~
  The old system worked like this. A function with an INLINE pragam
  got a right-hand side which looked like
       f = __inline_me__ (\xy. e)
  The __inline_me__ part was an InlineNote, and was treated specially
  in various ways.  Notably, the simplifier didn't inline inside an
  __inline_me__ note.

  As a result, the code for f itself was pretty crappy. That matters
  if you say (map f xs), because then you execute the code for f,
  rather than inlining a copy at the call site.

  The new story: InlineRules
  ~~~~~~~~~~~~~~~~~~~~~~~~~~
  The new system removes the InlineMe Note altogether.  Instead there
  is a new constructor InlineRule in CoreSyn.Unfolding.  This is a
  bit like a RULE, in that it remembers the template to be inlined inside
  the InlineRule.  No simplification or inlining is done on an InlineRule,
  just like RULEs.

  An Id can have an InlineRule *or* a CoreUnfolding (since these are two
  constructors from Unfolding). The simplifier treats them differently:

    - An InlineRule is has the substitution applied (like RULES) but
      is otherwise left undisturbed.

    - A CoreUnfolding is updated with the new RHS of the definition,
      on each iteration of the simplifier.

  An InlineRule fires regardless of size, but *only* when the function
  is applied to enough arguments.  The "arity" of the rule is specified
  (by the programmer) as the number of args on the LHS of the "=".  So
  it makes a difference whether you say
     {-# INLINE f #-}
   f x = \y -> e     or     f x y = e
  This is one of the big new features that InlineRule gives us, and it
  is one that Roman really wanted.

  In contrast, a CoreUnfolding can fire when it is applied to fewer
  args than than the function has lambdas, provided the result is small
  enough.

  Consequential stuff
  ~~~~~~~~~~~~~~~~~~~
  * A 'wrapper' no longer has a WrapperInfo in the IdInfo.  Instead,
    the InlineRule has a field identifying wrappers.

  * Of course, IfaceSyn and interface serialisation changes appropriately.

  * Making implication constraints inline nicely was a bit fiddly. In
    the end I added a var_inline field to HsBInd.VarBind, which is why
    this patch affects the type checker slightly

  * I made some changes to the way in which eta expansion happens in
    CorePrep, mainly to ensure that *arguments* that become let-bound
    are also eta-expanded.  I'm still not too happy with the clarity
    and robustness fo the result.

  * We now complain if the programmer gives an INLINE pragma for
    a recursive function (prevsiously we just ignored it).  Reason for
    change: we don't want an InlineRule on a LoopBreaker, because then
    we'd have to check for loop-breaker-hood at occurrence sites (which
    isn't currenlty done).  Some tests need changing as a result.

  This patch has been in my tree for quite a while, so there are
  probably some other minor changes.

    M ./compiler/basicTypes/Id.lhs -11
    M ./compiler/basicTypes/IdInfo.lhs -82
    M ./compiler/basicTypes/MkId.lhs -2 +2
    M ./compiler/coreSyn/CoreFVs.lhs -2 +25
    M ./compiler/coreSyn/CoreLint.lhs -5 +1
    M ./compiler/coreSyn/CorePrep.lhs -59 +53
    M ./compiler/coreSyn/CoreSubst.lhs -22 +31
    M ./compiler/coreSyn/CoreSyn.lhs -66 +92
    M ./compiler/coreSyn/CoreUnfold.lhs -112 +112
    M ./compiler/coreSyn/CoreUtils.lhs -185 +184
    M ./compiler/coreSyn/MkExternalCore.lhs -1
    M ./compiler/coreSyn/PprCore.lhs -4 +40
    M ./compiler/deSugar/DsBinds.lhs -70 +118
    M ./compiler/deSugar/DsForeign.lhs -2 +4
    M ./compiler/deSugar/DsMeta.hs -4 +3
    M ./compiler/hsSyn/HsBinds.lhs -3 +3
    M ./compiler/hsSyn/HsUtils.lhs -2 +7
    M ./compiler/iface/BinIface.hs -11 +25
    M ./compiler/iface/IfaceSyn.lhs -13 +21
    M ./compiler/iface/MkIface.lhs -24 +19
    M ./compiler/iface/TcIface.lhs -29 +23
    M ./compiler/main/TidyPgm.lhs -55 +49
    M ./compiler/parser/ParserCore.y -5 +6
    M ./compiler/simplCore/CSE.lhs -2 +1
    M ./compiler/simplCore/FloatIn.lhs -6 +1
    M ./compiler/simplCore/FloatOut.lhs -23
    M ./compiler/simplCore/OccurAnal.lhs -36 +5
    M ./compiler/simplCore/SetLevels.lhs -59 +54
    M ./compiler/simplCore/SimplCore.lhs -48 +52
    M ./compiler/simplCore/SimplEnv.lhs -26 +22
    M ./compiler/simplCore/SimplUtils.lhs -28 +4
    M ./compiler/simplCore/Simplify.lhs -91 +109
    M ./compiler/specialise/Specialise.lhs -15 +18
    M ./compiler/stranal/WorkWrap.lhs -14 +11
    M ./compiler/stranal/WwLib.lhs -2 +2
    M ./compiler/typecheck/Inst.lhs -1 +3
    M ./compiler/typecheck/TcBinds.lhs -17 +27
    M ./compiler/typecheck/TcClassDcl.lhs -1 +2
    M ./compiler/typecheck/TcExpr.lhs -4 +6
    M ./compiler/typecheck/TcForeign.lhs -1 +1
    M ./compiler/typecheck/TcGenDeriv.lhs -14 +13
    M ./compiler/typecheck/TcHsSyn.lhs -3 +2
    M ./compiler/typecheck/TcInstDcls.lhs -5 +4
    M ./compiler/typecheck/TcRnDriver.lhs -2 +11
    M ./compiler/typecheck/TcSimplify.lhs -10 +17
    M ./compiler/vectorise/VectType.hs +7

Mon Dec  8 12:43:10 GMT 2008  simonpj@microsoft.com
  * White space only

    M ./compiler/simplCore/Simplify.lhs -2

Mon Dec  8 12:48:40 GMT 2008  simonpj@microsoft.com
  * Move simpleOptExpr from CoreUnfold to CoreSubst

    M ./compiler/coreSyn/CoreSubst.lhs -1 +87
    M ./compiler/coreSyn/CoreUnfold.lhs -72 +1

Mon Dec  8 17:30:18 GMT 2008  simonpj@microsoft.com
  * Use CoreSubst.simpleOptExpr in place of the ad-hoc simpleSubst (reduces code too)

    M ./compiler/deSugar/DsBinds.lhs -50 +16

Tue Dec  9 17:03:02 GMT 2008  simonpj@microsoft.com
  * Fix Trac #2861: bogus eta expansion

  Urghlhl!  I "tided up" the treatment of the "state hack" in CoreUtils, but
  missed an unexpected interaction with the way that a bottoming function
  simply swallows excess arguments.  There's a long
       Note [State hack and bottoming functions]
  to explain (which accounts for most of the new lines of code).

    M ./compiler/coreSyn/CoreUtils.lhs -16 +53

Mon Dec 15 10:02:21 GMT 2008  Simon Marlow <marlowsd@gmail.com>
  * Revert CorePrep part of "Completely new treatment of INLINE pragmas..."

  The original patch said:

  * I made some changes to the way in which eta expansion happens in
    CorePrep, mainly to ensure that *arguments* that become let-bound
    are also eta-expanded.  I'm still not too happy with the clarity
    and robustness fo the result.

  Unfortunately this change apparently broke some invariants that were
  relied on elsewhere, and in particular lead to panics when compiling
  with profiling on.

  Will re-investigate in the new year.

    M ./compiler/coreSyn/CorePrep.lhs -53 +58
    M ./configure.ac -1 +1

Mon Dec 15 12:28:51 GMT 2008  Simon Marlow <marlowsd@gmail.com>
  * revert accidental change to configure.ac

    M ./configure.ac -1 +1

11 years agorevert accidental change to configure.ac
Simon Marlow [Mon, 15 Dec 2008 12:28:51 +0000 (12:28 +0000)] 
revert accidental change to configure.ac

11 years agoRevert CorePrep part of "Completely new treatment of INLINE pragmas..."
Simon Marlow [Mon, 15 Dec 2008 10:02:21 +0000 (10:02 +0000)] 
Revert CorePrep part of "Completely new treatment of INLINE pragmas..."

The original patch said:

* I made some changes to the way in which eta expansion happens in
  CorePrep, mainly to ensure that *arguments* that become let-bound
  are also eta-expanded.  I'm still not too happy with the clarity
  and robustness fo the result.

Unfortunately this change apparently broke some invariants that were
relied on elsewhere, and in particular lead to panics when compiling
with profiling on.

Will re-investigate in the new year.

11 years agowake up other Capabilities even when there is only one spark (see #2868)
Simon Marlow [Wed, 10 Dec 2008 16:46:44 +0000 (16:46 +0000)] 
wake up other Capabilities even when there is only one spark (see #2868)

11 years agoDocument new GC options -q1 and -qg<n>
Simon Marlow [Wed, 10 Dec 2008 16:45:57 +0000 (16:45 +0000)] 
Document new GC options -q1 and -qg<n>

11 years agoSysTools no longer needs -fno-cse
Ian Lynagh [Thu, 11 Dec 2008 18:23:27 +0000 (18:23 +0000)] 
SysTools no longer needs -fno-cse

11 years agoMake the lists of files and directories to be cleaned-up non-global
Ian Lynagh [Thu, 11 Dec 2008 18:07:39 +0000 (18:07 +0000)] 
Make the lists of files and directories to be cleaned-up non-global
They still need to be stored in IORefs, as the exception handler needs
to know what they all are.

11 years agoThe default cleanup handler should /always/ delete the temp files
Ian Lynagh [Thu, 11 Dec 2008 17:00:06 +0000 (17:00 +0000)] 
The default cleanup handler should /always/ delete the temp files
Not only if there has been an exception. It worked for GHC anyway,
as it was getting an ExitSuccess exception, but GHC API clients
shouldn't be required to do that.

11 years agoFix user guide typesetting
Ian Lynagh [Wed, 10 Dec 2008 16:54:34 +0000 (16:54 +0000)] 
Fix user guide typesetting

11 years agoFIX #1364: added support for C finalizers that run as soon as the value is not longer...
Simon Marlow [Wed, 10 Dec 2008 15:04:25 +0000 (15:04 +0000)] 
FIX #1364: added support for C finalizers that run as soon as the value is not longer reachable.

Patch originally by Ivan Tomac <tomac@pacific.net.au>, amended by
Simon Marlow:

  - mkWeakFinalizer# commoned up with mkWeakFinalizerEnv#
  - GC parameters to ALLOC_PRIM fixed

11 years agoOn FreeBSD, try MAP_FIXED if ordinary mmap() fails to give us suitable memory
Simon Marlow [Wed, 10 Dec 2008 11:57:51 +0000 (11:57 +0000)] 
On FreeBSD, try MAP_FIXED if ordinary mmap() fails to give us suitable memory
This appears to be necessary on FreeBSD.  It might be necessary on
other OSs too, but I'm being cautious because using MAP_FIXED can lead
to crashes by overwriting existing mappings, and we have no (easy) way
to prevent that.

11 years agoDocument hs_init() infelicity (#2863)
Simon Marlow [Tue, 9 Dec 2008 16:43:22 +0000 (16:43 +0000)] 
Document hs_init() infelicity (#2863)

11 years agoImprove documentation for data family instances (cf Trac #1968)
simonpj@microsoft.com [Wed, 10 Dec 2008 05:44:32 +0000 (05:44 +0000)] 
Improve documentation for data family instances (cf Trac #1968)

The HEAD allows GADT syntax for data/newtype family instances.
(GHC 6.10 does not seem to.)

11 years agoMake some profiling flags dynamic
Ian Lynagh [Tue, 9 Dec 2008 23:01:57 +0000 (23:01 +0000)] 
Make some profiling flags dynamic
In particular:
    -fauto-sccs-on-all-toplevs          -auto-all   -no-auto-all
    -fauto-sccs-on-exported-toplevs     -auto       -no-auto
    -fauto-sccs-on-individual-cafs      -caf-all    -no-caf-all

11 years agoFix warnings in StgCmmGran
Ian Lynagh [Tue, 9 Dec 2008 22:24:13 +0000 (22:24 +0000)] 
Fix warnings in StgCmmGran

11 years agoAdd OPTIONS_CATCH,DERIVE,YHC to those that GHC knows about; trac #2847
Ian Lynagh [Tue, 9 Dec 2008 19:17:24 +0000 (19:17 +0000)] 
Add OPTIONS_CATCH,DERIVE,YHC to those that GHC knows about; trac #2847

11 years agoFix warnings in CgHpc
Ian Lynagh [Tue, 9 Dec 2008 19:17:13 +0000 (19:17 +0000)] 
Fix warnings in CgHpc

11 years agoParse pragma names better; trac #2847
Ian Lynagh [Tue, 9 Dec 2008 19:03:18 +0000 (19:03 +0000)] 
Parse pragma names better; trac #2847
We require that pragma names are not followed by pragma character,
defined as
    isAlphaNum c || c == '_'

11 years agoFix warnings in CgParallel
Ian Lynagh [Tue, 9 Dec 2008 18:44:02 +0000 (18:44 +0000)] 
Fix warnings in CgParallel

11 years agoFix warnings in StgCmmHpc
Ian Lynagh [Tue, 9 Dec 2008 18:40:04 +0000 (18:40 +0000)] 
Fix warnings in StgCmmHpc

11 years agoRemove an unnecessary -w flag
Ian Lynagh [Tue, 9 Dec 2008 18:38:12 +0000 (18:38 +0000)] 
Remove an unnecessary -w flag

11 years agoFix Trac #2861: bogus eta expansion
simonpj@microsoft.com [Tue, 9 Dec 2008 17:03:02 +0000 (17:03 +0000)] 
Fix Trac #2861: bogus eta expansion

Urghlhl!  I "tided up" the treatment of the "state hack" in CoreUtils, but
missed an unexpected interaction with the way that a bottoming function
simply swallows excess arguments.  There's a long
     Note [State hack and bottoming functions]
to explain (which accounts for most of the new lines of code).

11 years agoFix #2592: do an orderly shutdown when the heap is exhausted
Simon Marlow [Tue, 9 Dec 2008 10:59:19 +0000 (10:59 +0000)] 
Fix #2592: do an orderly shutdown when the heap is exhausted
Really we should be raising an exception in this case, but that's
tricky (see comments).  At least now we shut down the runtime
correctly rather than just exiting.

11 years agoFix #2848: avoid overflow during time calculation
Simon Marlow [Tue, 9 Dec 2008 10:56:00 +0000 (10:56 +0000)] 
Fix #2848: avoid overflow during time calculation

11 years agoFix #2838: we should narrow a CmmInt before converting to ImmInteger
Simon Marlow [Tue, 9 Dec 2008 10:55:15 +0000 (10:55 +0000)] 
Fix #2838: we should narrow a CmmInt before converting to ImmInteger