Open Zemyla opened 4 years ago
isn't that Alt
or Profunctor
instead of Decidable
? Jump looks like it's covariant rather than contravariant in m
, although it is contravariant in a
.
Neither should Alternative
depend on Applicative
, but that's a rant for a different forum.
Logically both Applicative
and Alternative
should be independent and Divisible
and Decidable
should be independent. They correspond to the four types of Day
convolution for the two categories Hask
and Hask^op
and their two monoidal structures with identity ()
and product (,)
or identity Void
and product Either
.
Decidable
seems to be, at the very least, independent ofDivisible
, and there's a lot of evidence that suggests that it should actually beDivisible
's superclass, going backwards fromApplicative
/Alternative
.First off, there's the utterly unnecessary
Monoid r
constraint on theDecidable
instance forOp r
. But while that may not be convincing on its own, I have found a class that'sContravariant
andDecidable
but can never beDivisible
:There isn't any reason to gate a sensible
Decidable
instance forJump
behind an impossibleDivisible
instance.