mtesseract / nakadi-client

Haskell Client Library for the Nakadi Event Broker
Other
13 stars 9 forks source link

Parameterize monad #57

Closed mtesseract closed 6 years ago

mtesseract commented 6 years ago

56

I open the PR now to simplify discussion about it. We shouldn't rush this change.

etorreborre commented 6 years ago

I still haven't done a full thorough review but this is shaping good!

mtesseract commented 6 years ago

Hi! I appreciate your comments a lot. Looks like I am overthrowing the complete type foundation at the moment, using some more MTL inspired techniques with any incoherent instances or the like.

So far it is looking good. I am currently working on another simplification: merging MonadNakadiHttp and MonadNakadiHttpStream.

How the actual streaming is exposed to the user might need some work as well, yes.

But right now I am rather optimistic, that we are on a good way.

I found this refactoring to be non-trivial, since the streaming is so heavily tight to IO.

mtesseract commented 6 years ago

What I forgot so say: the PR is not completely done yet. :)

etorreborre commented 6 years ago

I think what you are doing is more in line with Ed Kmett's tweet about how he would approach this. Also merging MonadNakadiHttp and MonadNakadiHttpStream seems right since both implementation are likely to be provided by the same library or module.

mtesseract commented 6 years ago

See #59