According to the docs it should return the longest prefix which does not satisfy the predicate. In ghci:
ghci> Data.ByteString.break (== 32) "hello world"
("hello"," world")
ghci> Data.ByteString.break (/= 32) "hello world"
("","hello world")
MicroHs does the opposite:
> Data.ByteString.break (== 32) "hello world"
("","hello world")
> Data.ByteString.break (/= 32) "hello world"
("hello"," world")
I discovered the issue by running the test suite of scanner package: Yuras/scanner#14
I'm also missing Data.ByteString.Unsafe (scanner uses only unsafeChrunsafeDrop from it, so not a big deal) and the whole Data.ByteString.Lazy thing.
According to the docs it should return the longest prefix which does not satisfy the predicate. In
ghci:MicroHs does the opposite:
I discovered the issue by running the test suite of
scannerpackage: Yuras/scanner#14I'm also missing
Data.ByteString.Unsafe(scanneruses onlyunsafeChrunsafeDropfrom it, so not a big deal) and the wholeData.ByteString.Lazything.