1. 02 Jul, 2008 1 commit
  2. 16 Jun, 2008 1 commit
    • simonpj@microsoft.com's avatar
      Fix Trac #2321: bug in SAT · c3693c2d
      simonpj@microsoft.com authored
        This is a fairly substantial rewrite of the Static Argument Transformatoin,
        done by Max Bolingbroke and reviewed and modified by Simon PJ.
        * Fix a subtle scoping problem; see Note [Binder type capture]
        * Redo the analysis to use environments
        * Run gentle simlification just before the transformation
  3. 17 Jun, 2008 1 commit
  4. 14 Jun, 2008 1 commit
    • simonpj@microsoft.com's avatar
      Fix nasty Simplifier scoping bug · 562ce83f
      simonpj@microsoft.com authored
      This bug was somehow tickled by the new code for desugaring
      polymorphic bindings, but the bug has been there a long time.  The
      bindings floated out in simplLazyBind, generated by abstractFloats,
      were getting processed by postInlineUnconditionally. But that was
      wrong because part of their scope has already been processed.
      That led to a bit of refactoring in the simplifier.  See comments
      with Simplify.addPolyBind.
      In principle this might happen in 6.8.3, but in practice it doesn't seem
      to, so probably not worth merging.
  5. 05 Jun, 2008 1 commit
    • simonpj@microsoft.com's avatar
      Add non-recursive let-bindings for types · 1b1190e0
      simonpj@microsoft.com authored
      This patch adds to Core the ability to say
      	let a = Int in <body>
      where 'a' is a type variable.  That is: a type-let.
      See Note [Type let] in CoreSyn.
      * The binding is always non-recursive
      * The simplifier immediately eliminates it by substitution 
      So in effect a type-let is just a delayed substitution.  This is convenient
      in a couple of places in the desugarer, one existing (see the call to
      CoreTyn.mkTyBind in DsUtils), and one that's in the next upcoming patch.
      The first use in the desugarer was previously encoded as
      	(/\a. <body>) Int
      rather that eagerly substituting, but that was horrid because Core Lint
      had do "know" that a=Int inside <body> else it would bleat.  Expressing
      it directly as a 'let' seems much nicer.
  6. 03 Jun, 2008 2 commits
  7. 28 May, 2008 1 commit
    • Simon Marlow's avatar
      Use MD5 checksums for recompilation checking (fixes #1372, #1959) · 526c3af1
      Simon Marlow authored
      This is a much more robust way to do recompilation checking.  The idea
      is to create a fingerprint of the ABI of an interface, and track
      dependencies by recording the fingerprints of ABIs that a module
      depends on.  If any of those ABIs have changed, then we need to
      In bug #1372 we weren't recording dependencies on package modules,
      this patch fixes that by recording fingerprints of package modules
      that we depend on.  Within a package there is still fine-grained
      recompilation avoidance as before.
      We currently use MD5 for fingerprints, being a good compromise between
      efficiency and security.  We're not worried about attackers, but we
      are worried about accidental collisions.
      All the MD5 sums do make interface files a bit bigger, but compile
      times on the whole are about the same as before.  Recompilation
      avoidance should be a bit more accurate than in 6.8.2 due to fixing
      #1959, especially when using -O.
  8. 16 May, 2008 1 commit
    • simonpj@microsoft.com's avatar
      Improve the treatment of 'seq' (Trac #2273) · 4e36a8b1
      simonpj@microsoft.com authored
      Trac #2273 showed a case in which 'seq' didn't cure the space leak
      it was supposed to.  This patch does two things to help
      a) It removes a now-redundant special case in Simplify, which
         switched off the case-binder-swap in the early stages.  This
         isn't necessary any more because FloatOut has improved since
         the Simplify code was written.  And switching off the binder-swap
         is harmful for seq.
      However fix (a) is a bit fragile, so I did (b) too:
      b) Desugar 'seq' specially.  See Note [Desugaring seq (2)] in DsUtils
         This isn't very robust either, since it's defeated by abstraction, 
         but that's not something GHC can fix; the programmer should use
         a let! instead.
  9. 04 May, 2008 8 commits
  10. 22 Apr, 2008 2 commits
  11. 12 Apr, 2008 5 commits
  12. 22 Apr, 2008 4 commits
    • simonpj@microsoft.com's avatar
      Simplify SimplCont, plus some other small changes to the Simplifier · 53f99d84
      simonpj@microsoft.com authored
      The main change in this patch is this:
        * The Stop constructor of SimplCont no longer contains the OutType
          of the whole continuation.  This is a nice simplification in 
          lots of places where we build a Stop continuation.  For example,
          rebuildCall no longer needs to maintain the type of the function.
        * Similarly StrictArg no longer needs an OutType
        * The consequential complication is that contResultType (not called
          much) needs to be given the type of the thing in the middle.  No
          big deal.
        * Lots of other small knock-on effects
      Other changes in here
        * simplLazyBind does do the type-abstraction thing if there's
          a lambda inside.  See comments in simplLazyBind
        * simplLazyBind reduces simplifier iterations by keeping 
          unfolding information for stuff for which type abstraction is 
          done (see add_poly_bind)
      All of this came up when implementing System IF, but seems worth applying
      to the HEAD
    • simonpj@microsoft.com's avatar
      Comments only in SimplCore · 4e94e629
      simonpj@microsoft.com authored
    • simonpj@microsoft.com's avatar
      Comments only · 9526ada5
      simonpj@microsoft.com authored
    • simonpj@microsoft.com's avatar
      Fix a long-standing bug in FloatOut · c0fe534f
      simonpj@microsoft.com authored
      We really should not float anything out of an _inline_me_ Note,
      for reasons described in this new comment:
      	-- Do no floating at all inside INLINE.
      	-- The SetLevels pass did not clone the bindings, so it's
      	-- unsafe to do any floating, even if we dump the results
      	-- inside the Note (which is what we used to do).
      I'm about to get rid of these _inline_me_ Notes, but it's
      better to fix it anyway.  I found this bug when implementing System IF.
  13. 11 Apr, 2008 2 commits
    • simonpj@microsoft.com's avatar
      Revive the static argument transformation · 31478ab9
      simonpj@microsoft.com authored
      This patch revives the Static Argument Transformation, thanks to
      Max Bolingbroke.  It is enabled with 
      or	-O2
      Headline nofib results
                        Size    Allocs   Runtime
      Min             +0.0%    -13.7%    -21.4%
      Max             +0.1%     +0.0%     +5.4%
      Geometric Mean  +0.0%     -0.2%     -6.9%
    • simonpj@microsoft.com's avatar
      Transfer strictness and arity info when abstracting over type variables · 27061b5b
      simonpj@microsoft.com authored
      See Note [transferPolyIdInfo] in Id.lhs, and test 
      Max Bolingbroke discovered that we were gratuitiously losing strictness
      info.  This simple patch fixes it.  But see the above note for things
      that are still discarded: worker info and rules.
  14. 03 Apr, 2008 1 commit
    • simonpj@microsoft.com's avatar
      Fix simplifier thrashing · 3e571a94
      simonpj@microsoft.com authored
      Another example of the simplifier thrashing, getting nowhere.
      See SimplUtils, Note [Unsaturated functions]
      There's a test at eyeball/inline4.hs
  15. 29 Mar, 2008 2 commits
  16. 05 Mar, 2008 1 commit
    • simonpj@microsoft.com's avatar
      Refactor OccAnal; and improve dead-code elimination · 6dc702e8
      simonpj@microsoft.com authored
      The occurrence analyer is now really rather subtle when dealing
      with recursive groups; see Note [Loop breaking and RULES] especially.
      This patch refactors this code a bit, notably 
        * Introduces a new data type Details instead of a tuple
        * More clearly breaks up a recursive group into its SCCs
      	before processing it in a separate function occAnalRec
        * As a result, does better dead-code elimination, becuause it's
         	done per SCC rather than for the whole Rec
  17. 20 Feb, 2008 1 commit
  18. 22 Feb, 2008 2 commits
  19. 19 Feb, 2008 1 commit
  20. 07 Feb, 2008 1 commit
  21. 12 Feb, 2008 1 commit