FromDerived2 ProductFunctor repr =>
repr a -> repr b -> repr (a, b)
--- * Class 'AlternativeFunctor'
-class AlternativeFunctor repr where
- (<+>) :: repr a -> repr a -> repr a
+-- * Class 'SumFunctor'
+class SumFunctor repr where
+ (<+>) :: repr a -> repr b -> repr (Either a b)
(<+>) = liftDerived2 (<+>)
default (<+>) ::
+ FromDerived2 SumFunctor repr =>
+ repr a -> repr b -> repr (Either a b)
+
+-- * Class 'AlternativeFunctor'
+class AlternativeFunctor repr where
+ (<|>) :: repr a -> repr a -> repr a
+ (<|>) = liftDerived2 (<|>)
+ default (<|>) ::
FromDerived2 AlternativeFunctor repr =>
repr a -> repr a -> repr a