[gitconv @ Straightened out the code path through N.M.Commands.takeEntries]
commit04cae2a10ae8f6f27c81e9164e6c8758d937c6db
authorBen Sinclair <bsinclai@turing.une.edu.au>
Wed, 19 Mar 2008 17:37:14 +0000 (19 17:37 +0000)
committerBen Sinclair <bsinclai@turing.une.edu.au>
Wed, 19 Mar 2008 17:37:14 +0000 (19 17:37 +0000)
tree3d8750842cf5d5b79c2b5a4dcc8c981e4c4e99a5
parent9c2fbfb216db8b056b1aa3ddc728b9378a954ab1
[gitconv @ Straightened out the code path through N.M.Commands.takeEntries]
Utils.splitGroups got rewritten to support multiple cycle keys, not
just the first one encountered. Commands.takeEntries was rewritten to
return a type EntryType instead of a 3 tuple, and the functions that
use them were adjusted to fit. Doing this avoids building up a big
tuple of lists which just gets concatenated back together and makes
the code easier to write with mostly short point-free pipelines. The
main thing holding up performance now is the call to reverse in
takeEntries. For some reason the response is returned with the line
order back to front.

splitGroups' tests had to be changed because of its new signature and
Commands.takeSongs now expects a 'file' line at the start of each
group, so plChanges' test had to be changed.
Network/MPD/Commands.hs
Network/MPD/Utils.hs
tests/Commands.hs
tests/Properties.hs