Closed coot closed 7 years ago
Why not use Union
directly? This class doesn't add any new laws or behavior.
good point, indeed.
I feel like this has ergonomic value to library users: it requires one less variable definition in your forall
, and it somewhat clarifies your intentions. One place I would find this useful, for example, is in replacing use of Options
from purescript-options
with a simple SubRow r OptionsRow
.
It's a bit more readable than Union r r' OptionsRow
.
Here is an example of what I'm going for. I really think SubRow
makes this much more readable: http://try.purescript.org/?session=062a58b9-1bb1-b95d-2feb-b40bf47814b1&backend=core&gist=804bad033e33970e6ba10f84b669107e
I need
SubRow
class for: https://github.com/purescript/purescript-record/issues/5