File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -82,10 +82,11 @@ import Data.Aeson.Types
82
82
(parseEither )
83
83
import Data.Attoparsec.ByteString.Char8
84
84
(endOfInput , parseOnly , skipSpace , (<?>) )
85
+ import Data.Bifunctor
86
+ (bimap )
85
87
import qualified Data.ByteString as BS
86
88
import Data.ByteString.Lazy
87
89
(ByteString , fromStrict , toStrict )
88
- import qualified Data.ByteString.Lazy.Char8 as BC
89
90
import qualified Data.List.NonEmpty as NE
90
91
import Data.Maybe
91
92
(isJust )
@@ -350,7 +351,7 @@ instance MimeRender PlainText TextS.Text where
350
351
351
352
-- | @BC.pack@
352
353
instance MimeRender PlainText String where
353
- mimeRender _ = BC . pack
354
+ mimeRender _ = TextL. encodeUtf8 . TextL . pack
354
355
355
356
-- | @id@
356
357
instance MimeRender OctetStream ByteString where
@@ -409,7 +410,7 @@ instance MimeUnrender PlainText TextS.Text where
409
410
410
411
-- | @Right . BC.unpack@
411
412
instance MimeUnrender PlainText String where
412
- mimeUnrender _ = Right . BC . unpack
413
+ mimeUnrender _ = bimap show TextL . unpack . TextL. decodeUtf8'
413
414
414
415
-- | @Right . id@
415
416
instance MimeUnrender OctetStream ByteString where
You can’t perform that action at this time.
0 commit comments