diff options
author | tv <tv@krebsco.de> | 2022-04-05 21:39:55 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2022-04-05 22:06:40 +0200 |
commit | f4cdf79bd4a75e9eafe68b9a908f4cc68682b7ef (patch) | |
tree | d2cb50df2344d97042b2c006ee39811e2b87511d /src/Data/Text | |
parent | 032cb86ff8108eb4915a692015da344a41f78506 (diff) |
boom
Diffstat (limited to 'src/Data/Text')
-rw-r--r-- | src/Data/Text/Encoding/Extra.hs | 11 | ||||
-rw-r--r-- | src/Data/Text/Extra.hs | 8 |
2 files changed, 19 insertions, 0 deletions
diff --git a/src/Data/Text/Encoding/Extra.hs b/src/Data/Text/Encoding/Extra.hs new file mode 100644 index 0000000..a8e6234 --- /dev/null +++ b/src/Data/Text/Encoding/Extra.hs @@ -0,0 +1,11 @@ +module Data.Text.Encoding.Extra where + +import Data.ByteString (ByteString) +import Data.Text (Text) +import qualified Data.Text.Encoding as Text +import qualified Data.Text.Encoding.Error as Text + + +decodeUtf8Lenient :: ByteString -> Text +decodeUtf8Lenient = + Text.decodeUtf8With Text.lenientDecode diff --git a/src/Data/Text/Extra.hs b/src/Data/Text/Extra.hs new file mode 100644 index 0000000..07dd45c --- /dev/null +++ b/src/Data/Text/Extra.hs @@ -0,0 +1,8 @@ +module Data.Text.Extra where + +import Data.Text (Text) +import qualified Data.Text as Text + + +show :: Show a => a -> Text +show = Text.pack . Prelude.show |