-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Constraints on renderBytes
, renderText
#64
Comments
PR welcome to clarify the docs. There is currently no function for utf8 On Thu, Oct 29, 2015, 6:14 AM drquicksilver [email protected]
|
Happy to put together some better docs. Just trying to get my head around the situation and what is intended here. For It seems like a shame because As it happens I am trying to render a stream of Then the I can’t currently see how to write a general function which strips off a MonadThrow constraint from inside ConduitM. You can do it after you’ve run the conduit by doing
or similar. One more remark on reading this API: it’s initially counter intuitive that |
This is indeed about efficiency. Creating individual chunks of Text would On Thu, Oct 29, 2015, 1:31 PM drquicksilver [email protected]
|
It may be that I misunderstand the docs but the types of
renderBytes
andrenderText
are unexpected to me following from the phrase "this module does not provide IO and ST variants, since the underlying rendering operations are pure functions":The
PrimMonad
constraints force you to deal quite explicitly withST
orIO
to get the answers out. It also seems weird thatrenderText
getsMonadThrow
while the other two do not - it's not clear why that one would throw an exception any more than the other two; renderBytes by design can only generate valid UTF8ByteString
s so conversion toText
can never fail.The text was updated successfully, but these errors were encountered: