Closed garyb closed 7 years ago
@garyb in this case, you'll want proof of RowLacks "a" (b :: Int | r)
, i.e:
insertAB ∷ ∀ r. RowLacks "a" (b :: Int | r) ⇒ RowLacks "b" r ⇒ { | r } → { a ∷ Int, b ∷ Int | r }
insertAB = insertA <<< insertB
Alternatively you'd need some a way of conjuring up an instance of RowLacks "a" (b :: Int | r)
from RowLacks "a" r
and "a" /= "b"
. Which sounds more difficult.
RowLacks "a" (b :: Int | r)
That's probably the only thing I didn't try when attempting to work around it, thanks!
Is there some trick that I'm missing that would allow me to say that a row lacks more than one label?
I encountered this when trying to do some stuff with
purescript-record
:As far as I can see there's no way that multiple
RowLacks
constraints can be satisfied, given theUnion
-based implementation. Maybe this is something that would be better off solved by the compiler after all?