{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreibrps2lme4jimyxsc6ipnjmasjcj2fm5kwdr24z4wn4aosp4frcn4",
"uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mmhwgxaiemo2"
},
"path": "/t/from-text-type-class-to-convert-from-text/14150#post_1",
"publishedAt": "2026-05-22T21:18:32.000Z",
"site": "https://discourse.haskell.org",
"tags": [
"Hackage",
"from-text",
"text-conversions",
"string-conv",
"ttc",
"text-convert",
"lawful-conversions",
"witch",
"unwitch"
],
"textContent": "Hackage\n\n### from-text\n\nType class to convert from Text\n\nI released a new package which provides\n\n\n class IsText a where\n fromText :: Text -> a\n\n\naiming 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.\n\nThere is an overwhelming number of alternative packages for text conversions. To name a few in no particular order:\n\n * text-conversions\n * string-conv\n * ttc\n * text-convert\n * lawful-conversions\n * witch\n * unwitch\n\n\n\nAt 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.",
"title": "From-text: type class to convert from Text"
}