> * some optimizations in ByteString handling
> -import Data.Char ( ord, isSpace, toLower, toUpper
)
> +import Data.Char ( ord, toLower, toUpper )
> -readIntPS = BC.readInt . BC.dropWhile isSpace
> +readIntPS = BC.readInt . dropSpace
> +isSpace :: Char -> Bool
> +isSpace ' ' = True
> +isSpace '\t' = True
> +isSpace '\n' = True
> +isSpace '\r' = True
> +isSpace _ = False
This is a behaviour change from the old code: Data.Char.isSpace
would also match the rather obscure \v ("vertical tabulation"), \f
("form feed"), and 0xa0 ("non-breaking space").
http://hackage.haskell.org/package/base-
4.12.0.0/docs/src/GHC.Unicode.html#isSpace
Regardless, I think it only flows to the parsing of the line numbers
in a hunk patch (via the 'int' parser in Darcs.Patch.ReadMonads),
so I doubt it matters.
[I thought I understood ASCII, but I'd never had cause to think
about any of those three characters before!]
|