from-text

Type class to convert from Text

Stackage Nightly 2026-05-24:0.1
Latest on Hackage:0.1

See all snapshots from-text appears in

BSD-3-Clause licensed by Bodigrim
Maintained by [email protected]
This version can be pinned in stack with:from-text-0.1@sha256:4af6ef0a7f047143b216e02adec7a5b16b19bdbde20c3f65b902f7ad6b8a851e,1533

Module documentation for 0.1

from-text Hackage Stackage LTS Stackage Nightly

This package provides

class IsText a where
  fromText :: Text -> a

aiming to simplify conversion from Text to other textual data types, including ByteArray, ByteString and OsPath. When converting to binary types without an associated encoding, we use UTF-8.

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.

Changes

0.1

  • Initial release.