[GHC] #9623: Use Data.List.dropWhileEnd

GHC ghc-devs at haskell.org
Wed Oct 1 21:38:49 UTC 2014


#9623: Use Data.List.dropWhileEnd
-------------------------------------+-------------------------------------
              Reporter:  dfeuer      |            Owner:
                  Type:  task        |           Status:  new
              Priority:  normal      |        Milestone:  7.10.1
             Component:  libraries   |          Version:  7.8.3
  (other)                            |         Keywords:
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Easy (less than 1
  Unknown/Multiple                   |  hour)
       Type of failure:              |       Blocked By:
  None/Unknown                       |  Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by Joachim Breitner <mail@…>):

 In [changeset:"2a8856884de7d476e26b4ffa829ccb3a14d6f63e/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="2a8856884de7d476e26b4ffa829ccb3a14d6f63e"
 Use dropWhileEndLE p instead of reverse . dropWhile p . reverse

 Summary: Using `dropWhileEndLE` tends to be faster and easier to read
 than the `reverse . dropWhile p . reverse` idiom. This also cleans up
 some other, nearby, messes. Fix #9616 (incorrect number formatting
 potentially leading to incorrect numbers in output).

 Test Plan: Run validate

 Reviewers: thomie, rwbarton, nomeata, austin

 Reviewed By: nomeata, austin

 Subscribers: simonmar, ezyang, carter, thomie

 Projects: #ghc

 Differential Revision: https://phabricator.haskell.org/D259

 GHC Trac Issues: #9623, #9616

 Conflicts:
         compiler/basicTypes/OccName.lhs
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9623#comment:13>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list