-
Notifications
You must be signed in to change notification settings - Fork 29
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
add ListT monad transformer and relevant instances #71
base: master
Are you sure you want to change the base?
Conversation
If we add this, it definitely should be in its own module! |
Oh yeah, that was another question I had, but forgot to ask in the first comment. I think I agree. |
src/Streaming/Prelude.hs
Outdated
tell w = lift (tell w) | ||
{-# INLINE tell #-} | ||
|
||
--listen :: ListT m a -> ListT m (a, w) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's all this do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
define "all this"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just mean it's not obvious to me what listen
has to do in a stream contact and why this is how it's done. I'd appreciate a comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initially I thought that MonadWriter
might be useful to build up a ListT
, and then consume it, but I think an actual use of this might be misguided. Composing Writer with ListT
might (would?) be bad; Writer pretty much guarantees space leaks, and ListT
is meant for streaming. If someone is ever using the MonadWriter
instance for something like ListT
, they are likely to be doing something poorly.
Not sure if this instance should exist anymore.
src/Streaming/Prelude.hs
Outdated
pure (go p' $! mappend w w') ) | ||
Step (a :> rest) -> Step ( (a,w) :> go rest w) | ||
|
||
pass l = Select (go (enumerate l) mempty) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this?
Don't forget to revert all the |
I thought I did? |
But you did not.
git checkout master src/Streaming/Prelude.hs
and then commit.
…On Wed, Oct 3, 2018, 7:04 PM chessai ***@***.***> wrote:
I thought I did?
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#71 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABzi_dwk32pInoCnjG2Nn9a8ZDfRY45oks5uhUKMgaJpZM4XFL5u>
.
|
What about changing the README ? |
Yes, if this is approved, the README change will be the last commit to occur. Thanks for pointing this out. |
I'm against depending on "exceptions" in the main "streaming" package. I would prefer the package to remain agnostic about exception and resource handling, even at the cost of some inconvenience. |
Understandable, it would be nice if more people weighed in on this. |
I apologise for the spam - last night's outage caused GitHub to report that i was unable to comment, i hit the comment button multiple times. I guess after things got better, all copies of the comment went through. |
Are the unresolved questions still unresolved? |
My current personal answer to the questions is No, No, and No. Maybe others have thoughts? |
I agree with the triple-no. The |
This 2014 post by Gabriel Gonzalez gives examples of how concatenation-based |
Relevant issue: #54
Don't merge yet, some unresolved questions: