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

Small fixes to dhall diff #1263

Merged
merged 6 commits into from
Aug 31, 2019
Merged

Small fixes to dhall diff #1263

merged 6 commits into from
Aug 31, 2019

Conversation

Gabriella439
Copy link
Collaborator

Related to #1255

  • Simplify function type diffs by omitting the bound variable name when possible
  • Simplify diffs of bound variables when possible
  • Non-zero exit code when dhall diff is non-empty

Note that this is a breaking change to the Dhall.Diff API by changing the
exposed utilities to all expose the more general Diff type instead of a
Doc. This means that we also no longer need separate exports for
diff and diffExpression.

Related to #1255

* Simplify function type diffs by omitting the bound variable name when possible
* Non-zero exit code when `dhall diff` is non-empty

Note that this is a breaking change to the `Dhall.Diff` API by changing the
exposed utilities to all expose the more general `Diff` type instead of a
`Doc`.  This means that we also no longer need separate exports for
`diff` and `diffExpression`.
Copy link
Collaborator

@sjakobi sjakobi left a comment

Choose a reason for hiding this comment

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

  • Simplify function type diffs by omitting the bound variable name when possible
  • Simplify diffs of bound variables when possible

The appList test case seems to cover the second change. Would you mind also adding a test for the first one? My current general impression is that we have very low test coverage for some fairly tricky code here.

where
Diff {..} = diffExpression l0 r0
diff :: (Eq a, Pretty a) => Expr Void a -> Expr Void a -> Diff
diff = diffExpression
Copy link
Collaborator

Choose a reason for hiding this comment

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

How about renaming diffExpression to diff?

Copy link
Collaborator

@sjakobi sjakobi left a comment

Choose a reason for hiding this comment

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

Cheers! :)

@mergify mergify bot merged commit 0d266b9 into master Aug 31, 2019
@mergify mergify bot deleted the gabriel/diff_fixes branch August 31, 2019 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants