Closed phile314 closed 3 years ago
Thanks guys, I will review it soon!
Looks good to me! Thanks @phile314, I like it! 👍
If you could rebase (I merged a couple of your other PRs) and resolve conflicts then we can hit the green button and make a release!
Rebased on current master.
And thanks already for making a release with these changes, it is greatly appreciated :+1:
I was at first struggling to use the callbacks correctly. Granted, this was mostly my fault as I looked at the wrong hackage version of hw-client which did not yet have the examples in the doc on how to use the callbacks. But anyway, I find having the
... -> k -> IO ()
in the type signature a bit confusing. I was basically doing:instead of using
setCallback
and the producer properties.I think just wrapping the callbacks in a newtype makes it hard (impossible?) to make this mistake and improves readability. What do you think?
PS: Backward-compatiblity is only affected if people gave explicity type signatures for any variable containing the callback. If one just directly passes the callback to
setCallback
no change is required. E.g.:stil compiles.