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

BEq fails on structures with dependent types. #3740

Closed
1 task done
hargoniX opened this issue Mar 22, 2024 · 0 comments · Fixed by #3792
Closed
1 task done

BEq fails on structures with dependent types. #3740

hargoniX opened this issue Mar 22, 2024 · 0 comments · Fixed by #3792
Labels
bug Something isn't working

Comments

@hargoniX
Copy link
Contributor

hargoniX commented Mar 22, 2024

Prerequisites

  • Put an X between the brackets on this line if you have done all of the following:
    • Check that your issue is not already filed.
    • Reduce the issue to a minimal, self-contained, reproducible test case. Avoid dependencies to mathlib4 or std4.

Description

Deriving a BEq instance like so:

structure BVBit where
  {w : Nat}
  idx : Fin w
  deriving BEq

leads to an error:

type mismatch
  b✝
has type
  Fin b✝¹ : Type
but is expected to have type
  Fin a✝¹ : Type

Presumably because the BEq derive handler does not account for dependent types
in this fashion.

Steps to Reproduce

Run the above code

Expected behavior: we get a BEq instance

Actual behavior: we get a (rather undescriptive) error

Versions

"4.7.0-rc2"

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant