morphisms-functors-0.1.2: Functors, theirs compositions and transformations

Safe HaskellSafe
LanguageHaskell2010

Control.Functor.Alternative

Synopsis

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)

Minimal complete definition

(<+>)

Methods

(<+>) :: t a -> t a -> t a infixl 3 Source #

Infix version of alter

alter :: t a -> t a -> t a Source #

Prefix version of <+>