Hmm.
I understand, but in this case when you mixing deferred with either, you are delgating the error handling to either
the error notion of deffered can not contain left instances
the error notion of deffered can only contain exceptions so I thing if you want to combine the timeout aware deferreds with either you should handle 3 types of return values...
deferred[Left], deffered[Right] deffered[Exception]
I think that monad transformes doesn't make sense here...
In my opinion, if you are using deferred, just use its way to handle the error
Or... implement a different notion of timeout... instead of use the deferred builtin one
you can define your own timeout behavior that for example return a Left instance with some timeout related error inside
in this way, not using the builtin deferred timeout implementation, the transformers can be used without problems.
hmm, yes, a timeout returning a Left instance would work
niwinz: i did a PR to permit timeout values to be set as per discussion above
presumably the cats.labs.channel could be similarly extended with timeouts... i might take a look at that soon, i could do with some sane core.async timeout behaviour in the clojurescript bit of my project
nice work @mccraigmccraig
Thanks!
my little contribution in return for your nice work @niwinz :simple_smile:
\o/