Closed
Conversation
pcapriotti
reviewed
Dec 16, 2025
| -- JSON-encoded value of type @a@ and produces a value of type @b@, | ||
| -- while the serialiser portion of @sch@ takes a haskell value of type | ||
| -- @a@ and produces a JSON-encoding of something of type @b@. | ||
| -- @b@ and produces a JSON-encoding of something of type @a@. |
Contributor
There was a problem hiding this comment.
No, it was right before. The "flow" of information is always a -> b, otherwise the profunctor instance wouldn't work.
pcapriotti
reviewed
Dec 16, 2025
Comment on lines
+216
to
+218
| -- 'Applicative' interface of 'SchemaP d v w a b'. Example: This is | ||
| -- used for writing schemas of objects that draw their field from more | ||
| -- than one different schema. |
Contributor
There was a problem hiding this comment.
I'm not sure what the example is referring to. ObjectSchema is actually used all the time, because it's the argument of object.
pcapriotti
reviewed
Dec 16, 2025
| -- The idea of using the profunctor structure of 'SchemaP' is taken | ||
| -- from the [codec](https://github.com/chpatrick/codec) library. | ||
| -- from the [codec](https://github.com/chpatrick/codec) | ||
| -- library. (TODO: why are we using this and not codec?) |
Contributor
There was a problem hiding this comment.
I don't think codec supports swagger. There are other libraries that do, but they weren't available when I wrote this. Also now that we have written this library, tailored it to our use case and adapted all our code, what would even be the point of using something else? And why write it here as a TODO instead of just writing a comment or asking me directly?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://wearezeta.atlassian.net/browse/WPB-22451
Checklist
changelog.d