Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- class Covariant t => Alternative t where
Documentation
class Covariant t => Alternative t where Source #
When providing a new instance, you should ensure it satisfies the two laws: * Associativity of <+>: (x <+> y) <+> z ≡ x <+> (y <+> z) * Left-distributes <$> over <+>: f <$> (x <+> y) ≡ (f <$> x) <+> (f <$> y)
(<+>) :: t a -> t a -> t a infixl 3 Source #
Infix version of alter
alter :: t a -> t a -> t a Source #
Prefix version of <+>
Instances
Alternative Maybe Source # | |
Alternative Stack Source # | |
Alternative t => Alternative (Yoneda t) Source # | |
Alternative (Proxy :: Type -> Type) Source # | |
Alternative t => Alternative (Free t) Source # | |
Alternative (Validation e) Source # | |
Defined in Pandora.Paradigm.Basis.Validation (<+>) :: Validation e a -> Validation e a -> Validation e a Source # alter :: Validation e a -> Validation e a -> Validation e a Source # | |
Alternative t => Alternative (Jack t) Source # | |
Alternative (Conclusion e) Source # | |
Defined in Pandora.Paradigm.Basis.Conclusion (<+>) :: Conclusion e a -> Conclusion e a -> Conclusion e a Source # alter :: Conclusion e a -> Conclusion e a -> Conclusion e a Source # |