-
Notifications
You must be signed in to change notification settings - Fork 68
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
Implement a simple SchemaDescription visitor #295
Conversation
I'll mark this as draft, I'm not able to implement |
Ready for review I guess |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few nitpicks that I'd like addressed before merging, lgtm otherwise
Remarking as draft, I just merged into my other branch and I'm not satisfied. Everything works fine, but the |
@@ -42,4 +42,27 @@ trait SchemaVisitor[F[_]] extends (Schema ~> F) { | |||
case SurjectionSchema(schema, to, from) => surject(schema, to, from) | |||
case LazySchema(make) => lazily(make) | |||
} | |||
|
|||
def mapK[G[_]](f: F ~> G): SchemaVisitor[G] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To remove. Schema ~> F
already has andThen
which achieves exactly the same thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 73ec53e
I'm not sure this is what was expected, mostly because I figure the solution is much more verbose than the current solution. On the other side, this visitor will be available for other usages if we need it.