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

Fix pretty-printing order of UnexpectedEvent's fields (fixes #84) #85

Merged
merged 1 commit into from
Jun 9, 2016
Merged

Fix pretty-printing order of UnexpectedEvent's fields (fixes #84) #85

merged 1 commit into from
Jun 9, 2016

Conversation

khumba
Copy link
Contributor

@khumba khumba commented Jun 9, 2016

I didn't see tests for what error messages contain, so I'm not sure if you'd like a unit test with this, but I'm happy to add one if you say so.

@@ -78,7 +78,7 @@ prettyPrintParseException :: ParseException -> String
prettyPrintParseException pe = case pe of
NonScalarKey -> "Non scalar key"
UnknownAlias anchor -> "Unknown alias `" ++ anchor ++ "`"
UnexpectedEvent mbExpected mbUnexpected -> unlines
UnexpectedEvent { _expected = mbExpected, _received = mbUnexpected } -> unlines
Copy link
Owner

Choose a reason for hiding this comment

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

Beautiful way to handle this :)

@snoyberg snoyberg merged commit c3f4455 into snoyberg:master Jun 9, 2016
@snoyberg
Copy link
Owner

snoyberg commented Jun 9, 2016

Thanks!

snoyberg added a commit that referenced this pull request Jun 9, 2016
@khumba
Copy link
Contributor Author

khumba commented Jun 9, 2016

Thanks Michael!

@khumba khumba deleted the unexpectedevent branch June 9, 2016 19:14
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.

2 participants