Haskell provides a standard typeclass 'Alternative' that effectively provides the <|>
operator for any type that is also an Applicative.
As I understand it Alternative is considered a Monoid on Applicative's, however the <|>
operator seems to make complete sense in a lot of types that aren't Applicative Functors as well, and there doesn't need to be any specific dependency on the Applicative typeclass for it to work properly.
Is there a reason why Alternative needs to be a subclass of Applicative, and if so is there a standard typeclass to define similar functionality on non-applicative types?