Dmitrii Kovanikov
Dmitrii Kovanikov
Well, we can overload every function like it's done in `Print` module: type class per one function. Or we can overload all functions from `Lifted.File` module with one type class....
The more I write code the more I want polymorphic `readFile` and `writeFile` functions... Usually I need to read `ByteString` when I further process it with some `encode` function: `aeson`...
@volhovm Well, with `yaml` package I **have to** use strict `ByteString`. Though, I like the suggestion to not use `yaml`!
@effectfully This looks like and interesting idea. I would like to see benchmarks and profiling first just to be :100: sure that this implementation is faster or at least not...
@int-index Yes, this looks quite good to me.
Could you explain briefly how this would be implemented, how it will be used with unsigned types like `Word`?
@neongreen We can have both functions. Like `toInt` and `loselyToInt`. And probably don't care about 32-bit machines now :)
Then I'm voting for having both functions. Lossless version is not so useful, but safe. Non-lossless version is convenient but not safe. We just should put big comment under non-lossless...
I also faced this issue :( And I spent a lot of time to discover that problem was actually in BOM... Better error message would be appreciated!
I asked for the solution of this problem on SO when I first encountered this problem: * https://stackoverflow.com/questions/47367728/simplest-way-to-remove-bom-from-haskell-bytestring Maybe solution from SO will be faster than `stripPrefix` since I expect...