Safe Haskell | Safe-Inferred |
---|---|
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 <+>