Guest User

Untitled

a guest
Apr 18th, 2018
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.25 KB | None | 0 0
  1. Tue Oct 6 16:59:24 PDT 2009 Echo Nolan <echo@echonolan.net>
  2. * Fix Iter.take delaying actions one step.
  3. It was broken in two maddeninly subtle ways. The first: using joinIM delayed
  4. all actions associated with take's parameter iteratee one step. The second:
  5. it always returned Cont when the length of the chunk was <= the requested
  6. length and non-null. Thus, the values returned were one step delayed if the
  7. amount to take was equal to the length of the chunk passed.
  8.  
  9. New patches:
  10.  
  11. [Fix Iter.take delaying actions one step.
  12. Echo Nolan <echo@echonolan.net>**20091006235924
  13. Ignore-this: 2aa35f357f778727c2cc6c90e9cabd62
  14. It was broken in two maddeninly subtle ways. The first: using joinIM delayed
  15. all actions associated with take's parameter iteratee one step. The second:
  16. it always returned Cont when the length of the chunk was <= the requested
  17. length and non-null. Thus, the values returned were one step delayed if the
  18. amount to take was equal to the length of the chunk passed.
  19. ] hunk ./src/Data/Iteratee/Base.hs 477
  20. where
  21. step n chk@(Chunk str)
  22. | SC.null str = return $ Cont (take n iter) Nothing
  23. - | SC.length str <= n = return $ Cont (joinIM inner) Nothing
  24. + | SC.length str < n = liftM (flip Cont Nothing) inner
  25. where inner = liftM (check (n - SC.length str)) (runIter iter chk)
  26. step n (Chunk str) = done (Chunk s1) (Chunk s2)
  27. where (s1, s2) = SC.splitAt n str
  28.  
  29. Context:
  30.  
  31. [add sum and product.
  32. jwlato@gmail.com**20090921230901
  33. Ignore-this: 1dd15d532931955e938f887264682ac0
  34. ]
  35. [enumFd: change buffer size to 4096
  36. jwlato@gmail.com**20090919233300
  37. Ignore-this: 7225a88ede05df15f802244fade199b7
  38. ]
  39. [Base.foldl': inline and minor changes.
  40. jwlato@gmail.com**20090919233227
  41. Ignore-this: acd6f55b932070c526f1000f9d3e5edd
  42. ]
  43. [improve comments in Examples/headers.hs
  44. jwlato@gmail.com**20090916165655
  45. Ignore-this: d5e5018b6007508e81b9f571787c70dc
  46. ]
  47. [Base.hs: new foldl definition increases sharing
  48. jwlato@gmail.com**20090818170143
  49. Ignore-this: 623756a91e7cf5d28e528494434afcf1
  50. Measurably more efficient for general use.
  51. ]
  52. [add rigidMap and looseMap
  53. jwlato@gmail.com**20090811220245
  54. Ignore-this: 89152bccaea378dcd813a8278e6ab845
  55. ]
  56. [StreamChunk.hs -- fix type of cMap
  57. jwlato@gmail.com**20090806100223
  58. Ignore-this: f45233ed959ebc8ea8ceb67b6d518e97
  59. ]
  60. [make the default fileDrivers polymorphic over monads
  61. jwlato@gmail.com**20090731182923
  62. Ignore-this: b5807b6b8a52b9d4a72408b21b292d81
  63. ]
  64. [update IO.Fd to use the new enum* design
  65. jwlato@gmail.com**20090731182842
  66. Ignore-this: d2c8d0e4f0d85e6591d71fb06de4967
  67. ]
  68. [minor code cleanup
  69. jwlato@gmail.com**20090731131856
  70. Ignore-this: 66d6f3c327a79b5c5354e818d1cf62ac
  71. ]
  72. [new implementation of Handle enumerators
  73. jwlato@gmail.com**20090731131456
  74. Ignore-this: 8f788394c268d0ff785dee4ae6d5b110
  75. Previously, Handle enumerators would only work in the IO monad. This
  76. required users to frequently re-implement handle-based enumerators.
  77.  
  78. The new design is polymorphic over any MonadIO intance, allowing for
  79. much greater flexibility. Performance is generally similar to the
  80. old implementation. In addition to passing the test suite, this
  81. implementation works properly for the iter-audio driver, which requires
  82. both random IO and StateT monad stack.
  83. ]
  84. [add utilities to build the hpc-enabled test suite.
  85. jwlato@gmail.com**20090731130035
  86. Ignore-this: 111e1c5c0aedd74248d25741952e693f
  87. ]
  88. [minor extra documentation/commments
  89. jwlato@gmail.com**20090731124149
  90. Ignore-this: 3ccf212799c0a4b8aafd734fe52fa662
  91. ]
  92. [update exported modules
  93. jwlato@gmail.com**20090731124048
  94. Ignore-this: 48c7f4936bbb71c1134cc1f0fe0a306c
  95. Export IO.Windows on Windows
  96. Export IO.Posix and IO.Fd on POSIX
  97. Export IO.Handle everywhere
  98. Hide IO.Base everywhere
  99. ]
  100. [add stream2stream
  101. jwlato@gmail.com**20090724101654
  102. Ignore-this: 8a4ce39eb233aabed574dafcb22ffe7e
  103. ]
  104. [add liftInner
  105. jwlato@gmail.com**20090724101536
  106. Ignore-this: b8b9f3458de60ea92d7c306520828913
  107. ]
  108. [add dropWhile
  109. jwlato@gmail.com**20090719215128
  110. Ignore-this: a14b062f56842b75a0071b447a654524
  111. ]
  112. [take hlint suggestions
  113. jwlato@gmail.com**20090704133531
  114. Ignore-this: b4653c55d683305987ee3416e161eed4
  115. ]
  116. [update WrappedByteString to lesson dependency on Base.
  117. jwlato@gmail.com**20090701225018
  118. Ignore-this: 73e9c95ab1386dd83a10883b3b9c9dc
  119. ]
  120. [update CONTRIBUTORS
  121. jwlato@gmail.com**20090625182015
  122. Ignore-this: 2ac411b93b70ac2afdd02caf77c47724
  123. ]
  124. [fix conflicts from merging reformat of .cabal
  125. jwlato@gmail.com**20090625181948
  126. Ignore-this: d5f2eb5b0d66050a1901563fead411cc
  127. ]
  128. [Replaced Setup.lhs with Setup.hs.
  129. Brian Lewis <brian@lorf.org>**20090625132654
  130. Ignore-this: 18827dd404c1c1b89118b7324f24c089
  131. ]
  132. [Took some hlint suggestions.
  133. Brian Lewis <brian@lorf.org>**20090625132323
  134. Ignore-this: a7f6d36592926f30d16612320de439de
  135. ]
  136. [Cleaned up iteratee.cabal.
  137. Brian Lewis <brian@lorf.org>**20090625125537
  138. Ignore-this: f4bad79d1ed57a1d45e2a3eb6ccd6925
  139. ]
  140. [Fixed various whitespace issues.
  141. Brian Lewis <brian@lorf.org>**20090625122212
  142. Ignore-this: 78936ed222825a00a1eadad9e2dd8f40
  143. Deleted trailing whitespace and blank lines at the ends of files. Replaced tabs with spaces.
  144. ]
  145. [add enumPair combinator
  146. jwlato@gmail.com**20090623135615
  147. Ignore-this: 4962dd3941eda193e2dc1af0baf121ba
  148. ]
  149. [TAG 0.2.4
  150. jwlato@gmail.com**20090625112940
  151. Ignore-this: d4fd71e044cf92d5ace7edff39dca38
  152. ]
  153. Patch bundle hash:
  154. d1dd857cac6291fef3d312876811bc3e78bb4aef
Add Comment
Please, Sign In to add comment