intellij-arend
intellij-arend copied to clipboard
Implement missing clauses generates pattern variables for implicit parameters
Suppose that you are defining a function with an implicit parameter which also happens to be a class.
\instance DecWordMonoid (S : DecSet) : DecSet
| E => List (\Sigma S Bool)
| decideEq x y => {?}
| # => {?}
| #-irreflexive => {?}
| #-symmetric => {?}
| #-comparison => {?}
| tightness => {?}
| nonEqualApart => {?} \where {
\func word-dec (x y : List (\Sigma S Bool)) : Dec (x = y)
}
If you attempt to run the Generate missing clauses
quick-fix on word-dec
it produces the following result:
\func word-dec (x y : List (\Sigma S Bool)) : Dec (x = y)
| {(E,#,#-irreflexive,#-symmetric,#-comparison,tightness,decideEq,nonEqualApart)}, nil, nil => {?}
| {(E,#,#-irreflexive,#-symmetric,#-comparison,tightness,decideEq,nonEqualApart)}, nil, a :: y => {?}
| {(E,#,#-irreflexive,#-symmetric,#-comparison,tightness,decideEq,nonEqualApart)}, a :: x, nil => {?}
| {(E,#,#-irreflexive,#-symmetric,#-comparison,tightness,decideEq,nonEqualApart)}, a :: x, a1 :: y => {?}
The problem here is that no first implicit argument is expected for any of the clauses.