You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reduced the issue to a self-contained, reproducible test case.
Description
Some type classes with multiple default fields cannot be instanced without providing any of the default fields.
Steps to Reproduce
classCls (T : Type) where
ITy: Type := Unit
cst: ITy
map (_: ITy) : ITy := cst
defTy: Type := Unit
instance : Cls Ty where
cst := ()
Actual behavior:
The code fails with the error fields missing: 'map'. Adding either map or ITy definitions to the instance works.
Expected behavior:
The code should generate an instance of Cls Ty. There's a workaround (other than repeating the defaults) using functions with default arguments that demonstrates that this should be reasonable to expect;
Prerequisites
Description
Some type classes with multiple default fields cannot be instanced without providing any of the default fields.
Steps to Reproduce
Actual behavior:
The code fails with the error
fields missing: 'map'
. Adding eithermap
orITy
definitions to the instance works.Expected behavior:
The code should generate an instance of
Cls Ty
. There's a workaround (other than repeating the defaults) using functions with default arguments that demonstrates that this should be reasonable to expect;This works as you would expect.
Versions
Lean (version 4.0.0-nightly-2023-04-20, commit f9da1d8, Release)
Windows 11
The text was updated successfully, but these errors were encountered: