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

Test changes for dhall-purescript #1190

Merged
merged 6 commits into from
Jul 9, 2021

Conversation

MonoidMusician
Copy link
Collaborator

There were some minor discrepancies that kept some of the tests from passing in my dhall-purescript implementation, including some alpha normalization differences that I previously worked around in the test suite: MonoidMusician/dhall-purescript@192d6b3

This is based on my interpretation of the standard/test spec, perhaps not all of these tweaks should actually be upstreamed.

To match the non-alpha-normalized result given in
tests/normalization/success/remoteSystemsB.dhall
Given that they appear at the top level, not in an import.
Since its import (Bool/package.dhall) contains imports
protected by integrity checks.
This is to allow implementations to either take the type from the
expression or from the annotation, without having to alpha-normalize
to see that the types match for the purposes of the test.
@MonoidMusician
Copy link
Collaborator Author

I just checked with dhall-haskell and these changes do not seem to affect passage of the tests (if I'm doing it properly, that is …). I do get one test failure both at the latest dhall-lang and with my changes:

Dhall Tests
  import tests
    discover
      ./dhall-lang/tests/import/success/hashFromCacheA.dhall:                                                                  
Warning: Import integrity check failed

Expected hash:

↳ 618f785ce8f3930a9144398f576f0a992544b51212bc9108c31b4e670dc6ed21

Actual hash:

↳ ca2cb37e2ff08f1748be98e8eaf61598d93b25e2f716c8857303aa9028b86280

But that probably just means I am running the tests wrong (XDG_CACHE_HOME=dhall/dhall-lang/tests/import/cache stack test dhall or without XDG_CACHE_HOME set).

@Nadrieril
Copy link
Member

Excellent! Turns out I was mistakenly normalizing fully in import tests and hadn't noticed before

@Gabriella439 Gabriella439 merged commit acc5466 into dhall-lang:master Jul 9, 2021
@travisbrown
Copy link
Collaborator

@MonoidMusician Are you also running the type-inference/success/prelude tests? When I updated Dhall for Java past this point I had to make some changes to make sure that import resolution alpha-normalizes the result when there's an integrity check, and now I'm seeing some of the Monoid tests fail.

@MonoidMusician
Copy link
Collaborator Author

Ah no, I had to skip the prelude test since my implementation is inefficient, so I probably missed something there.

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

4 participants