Row contains#3411
Conversation
|
Errored out at cloning github repos as usual... but I guess we can come back to this in a bit |
|
This was fixed with some amended commits |
|
|
||
| solveRowContains :: [Type] -> Maybe [TypeClassDict] | ||
| solveRowContains [TypeLevelString sym, r, _] = | ||
| pure [ TypeClassDictionaryInScope [] 0 EmptyClassInstance [] C.RowContains [TypeLevelString sym, r, result] Nothing ] |
There was a problem hiding this comment.
We need to do a bit more than this. Currently if sym = "x" and r = (y :: Int | s), then we would result in False! In this situation we should defer to RowContains "x" s. This will be very similar to how the RowLacks instance is solved. (With canMakeProgress and cst).
Does that make sense?
There was a problem hiding this comment.
I need to supply not only the rest of the row but also a result placeholder though, as RowContains "x" s result. Is there somewhere I can find this?
There was a problem hiding this comment.
I think you can reuse the last argument: the _ in solveRowContains [TypeLevelString sym, r, _] =.
There was a problem hiding this comment.
Cool, I tried it out and put it in the constraints
aea7dff to
867853a
Compare
12123fd to
36bc181
Compare
e2312db to
03177f3
Compare
|
updated to latest changes in master, requested changes has already been applied |
|
What is wrong with this PR? |
|
Cleaning up my github notifications |
add Prim.Row.Contains solved type class
depends on #3389