Closed phadej closed 4 years ago
Things to think about:
semigroups
dependencyintersection
is also a semigroup / monoidIt looks like the the revdeps already depend on semigroups
. I'm leaning towards a newtype for one or both instances.
intersection
is a partial function for non-empty variant, thus I'd prefer Semigroup
for it.
The newtype for normal variant could be useful indeed: newtype Intersection a = Intersection (Interval a)
with mempty = Intersection whole
?
@bergey
Data.Semigroup
is now in base if that matters,
I was hoping to use this for a similar purpose to data Interval = Between Time Time
from Constructing Applicative Functors.
Does it make sense to have:
I could make a PR, if these instances are OK