1. 21 Nov, 2014 1 commit
  2. 13 Nov, 2014 1 commit
    • David Feuer's avatar
      Make unwords and words fuse somewhat · e73ab541
      David Feuer authored
      Make `words` a good producer and `unwords` a good consumer for list
      fusion. Thus `unwords . words` will avoid producing an intermediate list
      of words, although it will produce each individual word.
      
      Make `unwords` slightly lazier, so that
      `unwords (s : undefined) = s ++ undefined` instead of `= undefined`.
      
      Reviewed By: austin
      
      Differential Revision: https://phabricator.haskell.org/D375
      e73ab541
  3. 07 Nov, 2014 1 commit
  4. 02 Nov, 2014 1 commit
  5. 28 Oct, 2014 1 commit
    • David Feuer's avatar
      base: Refactor/clean-up *List modules · 75979f36
      David Feuer authored
      This gets rid of all hand-unboxing in `GHC.List` and moves `Foldable`
      requirements from `Data.OldList` into `GHC.List` (preparatory work for
      addressing #9716).  Specifically, this moves the definition of
      `maximum`, `minimum`, `foldl'`, `foldl1`, `foldl1'`, `sum`, and
      `product` into `GHC.List` (which now needs to import `GHC.Num`)
      
      Make `take`, `drop`, `length`, and `!!` generally saner (see also #9510)
      
      Performance overall seems minimally affected. Some things go up; some
      things go down; nothing moves horribly much. The code is much easier to
      read.
      
      Differential Revision: https://phabricator.haskell.org/D380
      75979f36
  6. 27 Oct, 2014 1 commit
  7. 21 Oct, 2014 1 commit
    • David Feuer's avatar
      Make findIndices fuse · ef2d0279
      David Feuer authored
      Summary:
      Steal the findIndices implementation from Data.Sequence, that can
      participate in fold/build fusion
      
      Reviewers: nomeata, austin
      
      Reviewed By: nomeata, austin
      
      Subscribers: thomie, carter, ezyang, simonmar
      
      Differential Revision: https://phabricator.haskell.org/D345
      ef2d0279
  8. 16 Oct, 2014 2 commits
  9. 01 Oct, 2014 1 commit
  10. 20 Sep, 2014 1 commit
    • Herbert Valerio Riedel's avatar
      Set up framework for generalising Data.List to Foldables · 3daf0023
      Herbert Valerio Riedel authored
      This renames the Data.List module to Data.OldList, and puts a new
      Data.List module into its place re-exporting all list functions.
      
      The plan is to leave the monomorphic versions of the list functions in
      Data.OldList to help smooth the transition.
      
      The new Data.List module then will simply re-export entities from
      Data.OldList and Data.Foldable.
      
      This refactoring has been placed in a separate commit to be able to
      better isolate any regressions caused by the actual list function
      generalisations when implementing #9586
      
      This also updates the haskell2010, haskell98, and array submodules
      
      Reviewed By: austin, ekmett
      
      Differential Revision: https://phabricator.haskell.org/D228
      3daf0023
  11. 09 Sep, 2014 1 commit
  12. 06 Sep, 2014 1 commit
    • Joachim Breitner's avatar
      INLINE unfoldr · 78209d70
      Joachim Breitner authored
      Summary:
      to allow GHC to maybe remove the Maybe. See the code comment for more
      commentary. This fixes #9369.
      
      Test Plan: see what happens on ghcspeed (once it is merged)
      
      Reviewers: austin
      
      Reviewed By: austin
      
      Subscribers: simonmar, ezyang, carter
      
      Differential Revision: https://phabricator.haskell.org/D198
      
      GHC Trac Issues: #9369
      78209d70
  13. 04 Sep, 2014 1 commit
  14. 20 Jul, 2014 1 commit
  15. 19 Apr, 2014 3 commits
  16. 10 Feb, 2014 2 commits
    • Joachim Breitner's avatar
      Inline maximum/minium a bit more aggresively · 79dfb968
      Joachim Breitner authored
      in order to allow fusion of the foldr in the foldl in the foldl' therein.
      79dfb968
    • Joachim Breitner's avatar
      Implement foldl with foldr · 78221667
      Joachim Breitner authored
      together with the call arity analysis and the following patch (about inlining
      maximum), we get nice benefits from fusing foldl and foldl' with good
      producers:
      
                      Min          -0.1%    -74.5%     -6.8%     -8.3%    -50.0%
                      Max          +0.2%      0.0%    +38.5%    +38.5%      0.0%
           Geometric Mean          -0.0%     -4.1%     +7.7%     +7.7%     -0.8%
      
      Because this depends on a compiler optimisation, we have to watch out for cases
      where this is not an improvements, and whether they occur in the wild.
      78221667
  17. 22 Sep, 2013 1 commit
  18. 17 Sep, 2013 1 commit
  19. 15 Feb, 2013 1 commit
  20. 02 Jan, 2013 1 commit
  21. 24 Dec, 2012 1 commit
    • Simon Peyton Jones's avatar
      Make sum and product INLINABLE · f251bf58
      Simon Peyton Jones authored
      This was causing the bad behaviour in Trac #7507,
      because 'sum' wasn't getting specialised to Int64.
      
      It also deals with Trac #4321, which had the same cause.
      
      This has a big effect on some nofib programs too:
      
      --------------------------------------------------------------------------------
              Program           Allocs   Runtime   Elapsed  TotalMem
      ------------------------------------------------------------------------
           bernouilli            -2.6%     -2.0%     -2.0%     +0.0%
                 fft2           -23.8%      0.09      0.09    -16.7%
                fluid            -4.4%      0.01      0.01     +0.0%
               hidden            -3.2%     +2.1%     +1.8%     +0.0%
            integrate           -38.0%    -47.7%    -47.7%     -1.0%
                 x2n1           -30.2%      0.01      0.01    -50.0%
      ------------------------------------------------------------------------
                  Min           -38.0%    -47.7%    -47.7%    -50.0%
                  Max            +0.4%    +11.2%    +11.8%     +6.9%
       Geometric Mean            -1.3%     +0.2%     +0.2%     -0.8%
      f251bf58
  22. 27 Oct, 2012 3 commits
    • ian@well-typed.com's avatar
      More type signature improvements from Bas van Dijk · 123ba5ef
      ian@well-typed.com authored
      No changes, just using nicer type variable names
      123ba5ef
    • ian@well-typed.com's avatar
      Remove commented types in module export lists · fda30027
      ian@well-typed.com authored
      These comments are rather less useful now that haddock can give docs
      with the same informatino in the module synopsis.
      
      Having to maintain them when making changes to the library is a pain,
      and when people forget about doing so there is nothing that checks that
      the comments are right, so mistakes tend to linger.
      
      Of the comments that my script detected, 78 of 684 were already
      incorrect in one way or another, e.g. missing context:
          Text.Show.showsPrec
          Comment type: Int -> a -> ShowS
          Actual type:  Show a => Int -> a -> ShowS
      wrong context:
          Numeric.readInt
          Comment type: Integral a => a -> (Char -> Bool) -> (Char -> Int) -> ReadS a
          Actual type:  Num a => a -> (Char -> Bool) -> (Char -> Int) -> ReadS a
      not following a class change (e.g. Num losing its Eq superclass):
          Text.Read.Lex.readOctP
          Comment type: Num a => ReadP a
          Actual type:  (Eq a, Num a) => ReadP a
      not following the Exceptions change:
          GHC.Conc.childHandler
          Comment type: Exception -> IO ()
          Actual type:  SomeException -> IO ()
      or just always been wrong:
          GHC.Stable.deRefStablePtr
          Comment type: StablePtr a -> a
          Actual type:  StablePtr a -> IO a
      fda30027
    • illissius's avatar
  23. 25 Jul, 2012 1 commit
  24. 27 May, 2012 1 commit
  25. 19 Mar, 2012 1 commit
  26. 14 Nov, 2011 1 commit
  27. 26 Oct, 2011 1 commit
  28. 18 Jun, 2011 1 commit
  29. 03 Apr, 2011 1 commit
    • Ian Lynagh's avatar
      Less strict inits and tails · 0b6ff782
      Ian Lynagh authored
      Converted from darcs patches from Bas van Dijk <v.dijk.bas@gmail.com>
      
      Previously: tails _|_ = _|_
      Now:        tails _|_ = _|_ : _|_
      
      Previously: inits _|_ = _|_
      Now:        inits _|_ = [] : _|_
      0b6ff782
  30. 28 Jan, 2011 1 commit
  31. 20 Oct, 2010 1 commit
    • Daniel Fischer's avatar
      FIX #4334 · c3c35334
      Daniel Fischer authored
      Make selector thunks visible to GHC to fix a space leak in lines.
      c3c35334
  32. 02 Oct, 2010 1 commit
    • Daniel Fischer's avatar
      Lazier intersperse · efc5f12b
      Daniel Fischer authored
      A lazier implementation of intersperse, and consequentially intercalate, to
      avoid space leaks.
      efc5f12b
  33. 30 Sep, 2010 1 commit
    • Daniel Fischer's avatar
      Make intersectBy lazier · 8e812825
      Daniel Fischer authored
      Add shortcuts to intersectBy for empty list arguments.
      In addition to being faster in that case, more inputs yield defined results.
      Treats ticket #4323
      8e812825
  34. 01 Jul, 2010 1 commit