Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Bytezap.Text
Documentation
stringUtf8 :: String -> Write Source #
TODO
In a perfect world, functions like this would not exist. But this is not a
perfect world. String
s suck for a number of reasons. One big one is that
they are horrendous to serialize. Worse, as of GHC 9.6, type-level strings
only reflect to String
. This function does the best it can to efficiently
serialize String
s. It would be much easier and probably similarly fast to
go through Text
instead, but who doesn't like a little challenge?