Skip to content
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

Monoid instances are wrong #218

Open
fisx opened this issue Jun 14, 2020 · 2 comments
Open

Monoid instances are wrong #218

fisx opened this issue Jun 14, 2020 · 2 comments

Comments

@fisx
Copy link
Collaborator

fisx commented Jun 14, 2020

for instance:

  • the one in _swaggerPaths should treat the values as monoids and merge them.
  • PathItem should merge, but overwrites.
  • the on in _operationResponses (inside the Responses type) should overwrite. oh, and actually does. good.

proposed solution:

wrap InsOrdHashMap types in newtypes and give them individual instances. to be more specific, add newtype Merging a = Merging a and newtype Overwriting a = Overwriting a, and give instances for some concrete a as needed.

@fisx
Copy link
Collaborator Author

fisx commented Jun 14, 2020

I'm also not sure about SwaggerMonoid, which differns in very few places, and it's hard to see which those are. Perhaps we can get rid of this somehow as well?

@Taneb
Copy link

Taneb commented Jun 14, 2020

It looks like the issue with _swaggerPaths has been fixed on GitHub but not yet released (although I haven't tested it). The problem with how operations are merged still stands, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants