Abstract ByteString out of MIME rendering#1840
Abstract ByteString out of MIME rendering#1840dmjio wants to merge 4 commits intohaskell-servant:masterfrom
ByteString out of MIME rendering#1840Conversation
ByteString out of MIME rendering
c147670 to
82bd8cc
Compare
This avoids the orphan error
ByteString out of MIME renderingByteString out of MIME rendering
|
I need to make use of this associated type family in |
|
@dmjio A changelog entry would be really appreciated for this PR. :) |
|
Okay so, I am temporarily deciding against this. Ended up making my own |
This should allow us to abstract over
ByteStringfrom theMimeRender/MimeUnrenderclasses, without breaking any code and preserving existing semantics, while gaining extensibility to other platforms.On the client (e.g. browser) dealing with
JSString/JSValis often more efficient than marshalling by way ofByteString(at least for the JS backend). This change should be an easy win, keeping all existing code unaffected (via the type family defaulting rules), but allowing users on different platforms to use a type other thanByteString.Usage would look like: