nikita-volkov / refined

Refinement types with static checking
http://hackage.haskell.org/package/refined
MIT License
182 stars 31 forks source link

Add `refineEither` function #77

Closed spagy closed 3 years ago

spagy commented 3 years ago

The refineEither function returns an Either containing a value refined with either the predicate or the negated predicate depending on whether the value satisfies the predicate.

This closes #76.

I assume the next version will be 0.6.3 but I wasn't sure so haven't included a @since annotation. Happy to add one if that's the right thing to do.