Normal symbol substitution
type MyThingy = { a :: String, b :: Array String }
modify :: forall r1 (a :: String, b :: Array String) r "b" (Nullable (Array String)) (Array String)
. RowCons "b" (Nullable (Array String)) r r1
=> RowCons "b" (Array String) r (a :: String, b :: Array String)
class RowCons (l :: Symbol) (a :: Type) (i :: # Type) (o :: # Type)
| l a i -> o
, l o -> a i
We have l ("b") and o ((a :: String, b :: Array String)), so a and i can be solved for.
We already know a, so it acts as an extra constraint, and then i is produced from the substitution.
We know from the second constraint that r will then be (a :: String) without the field (b :: Array String)
Then with r we can use the first constraint to insert (b :: Nullable (Array String))
So r1 is (a :: String, b :: Nullable (Array String))
And the input is parsed as { a :: String, b :: Nullable (Array String) } by ReadForeign instances