Restrict props to `Record`
natefaubion opened this issue · 3 comments
natefaubion commented
You are guaranteed buggy behavior otherwise.
coot commented
Indeed, we could wrap props in a record like it is dome with the state already. Just limiting to records will rule out newtype wrappers of records (or we could type check this with a type class).
coot commented
We could wait for instance chains in 11.6.0 and use something as simple as this:
class IsRecord a
instance recordIsRecord :: IsRecord {|r}
else instance newtypeRecordIsRecord :: Newtype a {|r} => IsRecord a