-
Notifications
You must be signed in to change notification settings - Fork 444
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
deriving BEq
fails for structures with Prop
fields
#3140
Comments
There's nothing preventing there from The structure S where
p : True
deriving DecidableEq
#synth BEq S -- succeeds This seems to just be a bug in the |
I’m happy to change this to be a bug report on |
BEq
work for Prop
sderiving BEq
fails for structures with Prop
fields
I changed the title, but don’t have permission to change the label. |
I got a similar errror in structure Result where
derivation : String
mrs : MRS
deriving Repr the error is
where MRS is defined as structure MRS where
top : Var
index : Var
preds : List EP
hcons : List Constraint
icons : List Constraint
instance : ToFormat MRS where
format
| {top := t, index := i, preds := ps, icons := [], hcons := hs} =>
f!"[ LTOP: {t}
INDEX: {i}
RELS: < {Format.joinSep (ps.map fun a => format a) " "} >
HCONS: < {Format.joinSep (hs.map fun a => format a) " "} > ]"
| {top := t, index := i, preds := ps, icons := is, hcons := hs} =>
f!"[ LTOP: {t}
INDEX: {i}
RELS: < {Format.joinSep (ps.map fun a => format a) " "} >
HCONS: < {Format.joinSep (hs.map fun a => format a) " "} >
ICONS: < {Format.joinSep (is.map fun a => format a) " "} > ]"
instance : Repr MRS where
reprPrec m _ := f!"{m}"
|
@girving, could you update the issue description? I think no need to keep the old version, it's just noise now. If you prefer to just open a new issue that might even be easier. |
From my side. Not sure how I solved, but the error disappeared after moving to Lean last release. Maybe my step by step procedure to update Lean and std were not ideally and some of the lake clean and lake build solve the issue. |
@semorrison I updated the issue description. |
Closes #3140 --------- Co-authored-by: Joachim Breitner <[email protected]>
Woohoo, thank you! |
deriving BEq
currently fails if astructure
hasProp
fields, a simple example beingwhich produces the error message
From discussion in Zulip and here, this is due to
BEq
being defined only overType
, notSort
. However, the desire is to keep it this way, and instead fixderiving BEq
directly to ignoreProp
fields (which is fine by proof irrelevance).Impact
Add 👍 to issues you consider important. If others benefit from the changes in this proposal being added, please ask them to add 👍 to it.
The text was updated successfully, but these errors were encountered: