system-f / validation

A data-type like Either but with an accumulating Applicative
Other
99 stars 28 forks source link

Add selective instances #63

Open turion opened 2 months ago

turion commented 2 months ago

As shown in https://hackage.haskell.org/package/selective-0.7.0.1/docs/Control-Selective.html#t:Validation, this type has a natural Selective instance which is compatible with the Applicative instance and can be used instead of bindValidation in many places. Maybe it would be a good idea to implement this instance here, incurring a new (but lightweight) dependency.