-
Notifications
You must be signed in to change notification settings - Fork 116
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
Support deriving typeclasses with an effectful return type #43
Comments
I don't think the API needs to be this specific, does it? Could you work with a new def construct(paramValues: Seq[Any]): Type You could then fold the |
We would, of course, lose some typesafety with this version. The sequence is no longer length-safe, and it would be possible to treat the parameters non-uniformly. I would like to keep the old |
+1 for adding something like def construct(paramValues: Seq[Any]): Type I'm currently trying to write a "conserving tree rewriter" typeclass that is supposed to return the original case class instance if all its members have been rewritten to the identical instance. |
oh, I just fixed this in #120 for Either... but doing it in the general case for |
I think this is already done right? |
Like a
Decoder[A]
returning aEither[String, A]
, for each member of a type class we need to decode it. Currentlyconstruct
is deficient to do that.Current
How should this look like for effects?
Yet this would imply that for type classes with multiple methods the effect type will be the same (like codecs, in scodec this holds though)
Where do we get
Applicative
from? I wouldn't favor depending on cats or scalazThe text was updated successfully, but these errors were encountered: