haskell - How do I convert a Text to a bytestring Builder? -
the blaze-builder package provides .char.utf8 module includes fromtext , fromlazytext efficiently converting value text package blaze-builder builder value. new builder api in bytestring , however, no such function exists (since bytestring not depend on text ). unpack text values , use stringutf8 , that's slower. another option use blaze-builder , wrapper around bytestring 's builder type, i'm wondering if there's more idiomatic way of approaching this. you can use encodeutf8builder function , corresponding function lazy text .