The blaze-builder package introduces the .Char.Utf8 module, which includes fromText and fromLazyText to efficiently convert a value from a text package to a blaze-builder Builder value. However, with the new Builder API in bytestring such a function does not exist (since bytestring does not depend on text ). We could unpack the text values ββand use stringUtf8 , but that would almost certainly be much slower.
Another option is to use blaze-builder , which is now actually a wrapper like bytestring Builder , but I'm wondering if there is a more idiomatic way to get closer to this.
source share