servant
servant copied to clipboard
Upstreaming RawText from servant-http2-client
@lucasdicioccio Would you be okay with the upstreaming of your RawText
into servant
? I am specifically thinking about this code:
data RawText
instance Accept RawText where
contentType _ = "text/plain"
instance MimeRender RawText Text where
mimeRender _ = fromStrict . Encoding.encodeUtf8
instance MimeUnrender RawText Text where
mimeUnrender _ = pure . Encoding.decodeUtf8 . toStrict
Yes if you can use it, definitely do that!
Servant's BSD-3 license is okay for me.
Note that to package that in a pretty module you may want to have one module/file per "frequent combinations" of lazy/non-lazy and utf-8/latin-9 (albeit latin-9 hopefully is not really in demand/use much).