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

Conversation

@khumba
Copy link
Contributor

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

This comment has been minimized.

Copy link
@snoyberg

snoyberg Jun 9, 2016

Owner

Beautiful way to handle this :)

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

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@snoyberg

This comment has been minimized.

Copy link
Owner

commented Jun 9, 2016

Thanks!

snoyberg added a commit that referenced this pull request Jun 9, 2016
@khumba

This comment has been minimized.

Copy link
Contributor Author

commented Jun 9, 2016

Thanks Michael!

@khumba khumba deleted the khumba:unexpectedevent branch Jun 9, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.