diff --git a/docs/Strings.md b/docs/Strings.md index 699838302..2f77d78b1 100644 --- a/docs/Strings.md +++ b/docs/Strings.md @@ -23,10 +23,29 @@ LBytestring Encoding ---------- -* encodeUtf8 -* decodeUtf8 -* decodeUtf8' -* decodeUtf8With +#### encodeUtf8 + +```haskell +encodeUtf8 :: Text -> ByteString +``` + +#### decodeUtf8 + +```haskell +decodeUtf8 :: ByteString -> Text +``` + +#### decodeUtf8' + +```haskell +decodeUtf8' :: ByteString -> Text +``` + +#### decodeUtf8With + +```haskell +decodeUtf8With :: Data.Text.Encoding.Error.OnDecodeError -> ByteString -> Text +``` Conversion ---------- diff --git a/src/Protolude.hs b/src/Protolude.hs index 385099bcb..c9d020d5c 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -349,6 +349,15 @@ import Data.Text.Encoding as X ( , decodeUtf8With ) +import Data.Text.Encoding.Error as X ( + OnDecodeError + , OnError + , lenientDecode + , strictDecode + , ignore + , replace + ) + -- IO import System.Exit as X import System.Environment as X (getArgs)