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 build typecheck fails Haskell pattern match on #4357 #4358

Open
SaraWolffs opened this issue Feb 26, 2018 · 0 comments
Open

Test build typecheck fails Haskell pattern match on #4357 #4358

SaraWolffs opened this issue Feb 26, 2018 · 0 comments

Comments

@SaraWolffs
Copy link
Contributor

SaraWolffs commented Feb 26, 2018

Quoting from #4357 , which changes Prelude.Nat.fromIntegerNat but nothing else:

The appveyor build is failing (travis build as well), but I can't for the life of me see why. Relevant bits of the log:

Type checking .\Prelude\Nat.idr
.
.
.
Type checking .\Data\Bits.idr
Uncaught error: user error (Pattern match failure in do expression at src\Idris\Elab\Transform.hs:32:10-72)

The compiler itself builds just fine. Prelude.Nat still typechecks fine. So do lots of other libraries, and Data.Bits was left untouched, as was all Haskell code. Locally, building with Stack works fine. But when typechecking Data.Bits, the test environment fails a Haskell pattern match.

Looking at Transform.hs, it seems to expect an ElabResult with an empty (that is, []) resultCaseDecls field, which is the only part of the pattern match that looks like it could fail. Since I did add a case block, this seems at least related, but I'm still not sure how this case caused a problem but nothing else did.

Steps to Reproduce

None, continuous integration for PR #4357 demonstrates the issue.

Expected Behavior

Either

  • Prelude.Nat failing typecheck
  • Some other file failing typecheck in a way traceable to an error in fromIntegerNat
  • Tests failing, or
  • Everything passing

Observed Behavior

The Idris compiler throws an uncaught Haskell exception while typechecking Data.Bits, citing a Haskell user error, dying without reporting the Idris code it choked on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants