1. 20 Feb, 2010 2 commits
  2. 19 Feb, 2010 1 commit
  3. 18 Feb, 2010 2 commits
  4. 17 Feb, 2010 3 commits
  5. 16 Feb, 2010 4 commits
    • Simon Marlow's avatar
      Beef up cmmMiniInline a tiny bit · 6e9501c0
      Simon Marlow authored
      Allow a temporary assignment to be pushed past an assignment to a
      global if the global is not mentioned in the rhs of the assignment we
      are inlining.
      
      This fixes up some bad code.  We should make sure we're doing
      something equivalent in the new backend in due course.
      6e9501c0
    • Simon Marlow's avatar
      Write the binary cache file atomically · cd81cd88
      Simon Marlow authored
      Should fix an occasional build error of the form 
       ghc-pkg: too few bytes. Failed reading at byte position 8
      cd81cd88
    • Simon Marlow's avatar
      32578fc5
    • Simon Marlow's avatar
      Fix a bug that can lead to noDuplicate# not working sometimes. · c44aaa10
      Simon Marlow authored
      The symptom is that under some rare conditions when running in
      parallel, an unsafePerformIO or unsafeInterleaveIO computation might
      be duplicated, so e.g. lazy I/O might give the wrong answer (the
      stream might appear to have duplicate parts or parts missing).
      
      I have a program that demonstrates it -N3 or more, some lazy I/O, and
      a lot of shared mutable state.  See the comment with stg_noDuplicatezh
      in PrimOps.cmm that explains the problem and the fix.  This took me
      about a day to find :-(
      c44aaa10
  6. 15 Feb, 2010 5 commits
  7. 14 Feb, 2010 1 commit
  8. 11 Feb, 2010 1 commit
  9. 10 Feb, 2010 3 commits
    • simonpj@microsoft.com's avatar
      Improve error dump in TcEnv · d259dd70
      simonpj@microsoft.com authored
      d259dd70
    • simonpj@microsoft.com's avatar
      Keep track of explicit kinding in HsTyVarBndr; plus fix Trac #3845 · 836b1e90
      simonpj@microsoft.com authored
      To print HsTypes correctly we should remember whether the Kind on
      a HsTyVarBndr came from type inference, or was put there by the
      user.  See Note [Printing KindedTyVars] in HsTypes.  So instead of
      changing a UserTyVar to a KindedTyVar during kind checking, we
      simply add a PostTcKind to the UserTyVar.
      
      The change was provoked by Trac #3830, although other changes
      mean that #3830 gets a diferent and better error message now.
      So this patch is simply doing the Right Thing for the future.
      
      This patch also fixes Trac #3845, which was caused by a *type splice*
      not remembering the free *term variables* mentioned in it.  Result
      was that we build a 'let' when it should have been 'letrec'.
      Hence a new FreeVars field in HsSpliceTy.
      
      While I was at it, I got rid of HsSpliceTyOut and use a PostTcKind
      on HsSpliceTy instead, just like on the UserTyVar.
      836b1e90
    • simonpj@microsoft.com's avatar
  10. 08 Feb, 2010 1 commit
  11. 10 Feb, 2010 4 commits
    • simonpj@microsoft.com's avatar
      Stop fruitless ANF-ing · 9a977e72
      simonpj@microsoft.com authored
      The simplifier is taking more iterations than it should, because we
      were fruitlessly ANF-ing a top-level declaration of form
      
         x = Ptr "foo"#
      
      to get
       
         x = let v = "foo"# in Ptr v
      
      and then inlining v again.  This patch makes Simplify.makeTrivial 
      top-level aware, so that it doesn't ANF if it's going to be undone.
      9a977e72
    • simonpj@microsoft.com's avatar
      Comments only · 90686adf
      simonpj@microsoft.com authored
      90686adf
    • simonpj@microsoft.com's avatar
      Simplify syntax for quasi-quotation · 26f164e5
      simonpj@microsoft.com authored
      After some discussion we decided to make a quasi-quote look like
      
         [pads| ...blah... |]
      
      rather than
      
         [$pads| ...blah... |]
      
      as before. The new syntax is quieter, although it does not signal
      quite as clearly that there is a splice going on.
      26f164e5
    • simonpj@microsoft.com's avatar
      Several TH/quasiquote changes · 6f8ff0bb
      simonpj@microsoft.com authored
      a) Added quasi-quote forms for
            declarations
            types
         e.g.   f :: [$qq| ... |]
      
      b) Allow Template Haskell pattern quotes (but not splices)
         e.g.  f x = [p| Int -> $x |]
      
      c) Improve pretty-printing for HsPat to remove superfluous
         parens.  (This isn't TH related really, but it affects
         some of the same code.)
      
      
      A consequence of (a) is that when gathering and grouping declarations
      in RnSource.findSplice, we must expand quasiquotes as we do so.
      Otherwise it's all fairly straightforward.  I did a little bit of
      refactoring in TcSplice.
      
      User-manual changes still to come.
      6f8ff0bb
  12. 09 Feb, 2010 2 commits
  13. 08 Feb, 2010 1 commit
    • simonpj@microsoft.com's avatar
      Fix Trac #3850 · dafabe65
      simonpj@microsoft.com authored
      This patch simply avoids a needless difference in behaviour from 
      6.10, and one that happens to affect HList. See Note [Stupid theta].
      dafabe65
  14. 05 Feb, 2010 1 commit
  15. 04 Feb, 2010 1 commit
    • Simon Marlow's avatar
      Implement SSE2 floating-point support in the x86 native code generator (#594) · 335b9f36
      Simon Marlow authored
      The new flag -msse2 enables code generation for SSE2 on x86.  It
      results in substantially faster floating-point performance; the main
      reason for doing this was that our x87 code generation is appallingly
      bad, and since we plan to drop -fvia-C soon, we need a way to generate
      half-decent floating-point code.
      
      The catch is that SSE2 is only available on CPUs that support it (P4+,
      AMD K8+).  We'll have to think hard about whether we should enable it
      by default for the libraries we ship.  In the meantime, at least
      -msse2 should be an acceptable replacement for "-fvia-C
      -optc-ffast-math -fexcess-precision".
      
      SSE2 also has the advantage of performing all operations at the
      correct precision, so floating-point results are consistent with other
      platforms.
      
      I also tweaked the x87 code generation a bit while I was here, now
      it's slighlty less bad than before.
      335b9f36
  16. 03 Feb, 2010 6 commits
  17. 02 Feb, 2010 1 commit
  18. 30 Jan, 2010 1 commit