haskell-streaming / streaming-bytestring

effectful sequences of bytes; an alternative no-lazy-io implementation of Data.ByteString.Lazy
BSD 3-Clause "New" or "Revised" License
16 stars 11 forks source link

`groupBy` char ordering #26

Closed fosskers closed 4 years ago

fosskers commented 4 years ago

While groupBy no longer crashes, it does seem to still have a strange Char ordering bug that makes it effectively unusable. Looking at the nearly identical code of group, it's likely that group also suffers from this, but the user would never notice since group always uses == and thus element reordering within a group would never matter.

This PR fixes this bug and adds tests to prove it.

fosskers commented 4 years ago

Pinging also @vdukhovni .