# From-text: type class to convert from Text

> Source: <https://discourse.haskell.org/t/from-text-type-class-to-convert-from-text/14150#post_1>
> Published: 2026-05-22 21:18:32+00:00

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.
