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

Make compile cleanly with stack --pedantic #82

Merged
merged 1 commit into from
Sep 30, 2016

Conversation

phadej
Copy link
Collaborator

@phadej phadej commented Sep 28, 2016

No description provided.

@@ -62,17 +62,17 @@ makePrisms ''Referenced

_SwaggerItemsArray :: Review (SwaggerItems 'SwaggerKindSchema) [Referenced Schema]
_SwaggerItemsArray
= prism (\x -> SwaggerItemsArray x) $ \x -> case x of
= unto (\x -> SwaggerItemsArray x) {- $ \x -> case x of
Copy link
Collaborator Author

@phadej phadej Sep 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fizruk I wasn't sure, if this and _SwaggerItemsObject are lawful Prism', so changed to unto.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What made you suspicious? I don't see any violation (not looking very hard).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, the type is Review and not Prism', so I fixed the implementation (term) not the spec (type) :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So should I change type to Prism' and try to "prove" the laws in tests?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I didn't realise I had Review type! I wonder why I abandoned Prism... perhaps it did not compile with some old GHC. Thanks anyway!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't this you should bother, to be honest :)

Copy link
Collaborator Author

@phadej phadej Sep 30, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, cannot parse the previous, is this = think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, don't waste your time on this.

, base-compat >=0.6.0 && <0.10
, aeson
, base-compat >=0.9.1 && <0.10
, aeson >=0.11.2.1
Copy link
Collaborator Author

@phadej phadej Sep 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needed for ToJSON Day, only aeson-0.10 introduced it, but skipping directly to 0.11 shouldn't be a problem for any user. EDIT: there was typo: should

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be a problem?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, shouldn't.

@phadej phadej merged commit 016e4c3 into GetShopTV:master Sep 30, 2016
@phadej phadej deleted the stack-pedantic branch September 30, 2016 13:52
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

Successfully merging this pull request may close these issues.

None yet

2 participants