You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am prepearing the PR with support for new features from servant-0.18* but just realized that there is module Servant.Reflex.Multi which consists of a lot of duplcation instances of HasClientMulti.
My concern is do HasClientMulti t m layout Identity tag just identical to HasClient t m layout tag?
Maybe it would be valuable to just remove all HasClient instances and replace the class with
I think you're right. I added HasClientMulti later and did not want to disturb the original API, but I believe HasClientMulti t m layout Identity tag would work perfectly well in place of HasClient t m layout tag.
I wonder if there will be some difficulty implementing the function client in the non-multi case, if you make the proposed change. For instance, if we simply go ahead, will all the resulting client functions end up with parameters like Dynamic t (Either e (Identity a))? Is there a way for us to strip all those Identitys off for the API the end user sees?
If you can make this work, I'd definitely love a PR. The code duplication between non-multi and multi is really not nice.
I would like to pose the opposite question: HasClientMulti _ _ _ f _ uses Applicative f to combine inputs, and Traversable f to sequence the accumulated requests, so is there anything it can do that cannot be achieved by simply lifting these operations outside and using regular HasClient ?
I am prepearing the PR with support for new features from
servant-0.18*
but just realized that there is moduleServant.Reflex.Multi
which consists of a lot of duplcation instances ofHasClientMulti
.My concern is do
HasClientMulti t m layout Identity tag
just identical toHasClient t m layout tag
?Maybe it would be valuable to just remove all
HasClient
instances and replace the class withand fix according functions using
HasClient
likeclient
?The text was updated successfully, but these errors were encountered: