I released a new package which provides
class IsText a where
fromText :: Text -> a
aiming to simplify conversion from Text to other textual data types, including ByteArray , ByteString and OsPath . It uses UTF-8 when converting to binary types without an associated encoding. There is an overwhelming number of alternative packages for text conversions. To name a few in no particular order: At the moment none of them provide conversions from Text to OsPath . I could not decide which one to contribute such function to, so decided to create a new package.