Alternative -package:binary-generic-combinators

A monoid on applicative functors. If defined, some and many should be the least solutions of the equations:

Examples

>>> Nothing <|> Just 42
Just 42
>>> [1, 2] <|> [3, 4]
[1,2,3,4]
>>> empty <|> print (2^15)
32768
A monoid on applicative functors. If defined, some and many should be the least solutions of the equations:
Alternative utilities. For instance, they can be applied with parsing libraries.
A semigroup for working with Alternative Functors.
Check Alternative Monoid laws
Multiple alternative representations of the same data. For example, you could provide a plain-text and HTML version of a message.
Undocumented parsing-related extensions introduced in GHC 7.0.
Undocumented parsing-related extensions introduced in GHC 7.0.
A GtkShortcutTrigger that combines two triggers. The GtkAlternativeTrigger triggers when either of two trigger. This can be cascaded to combine more than two triggers.
Memory-managed wrapper type.
Combines two shortcut triggers. The GtkAlternativeTrigger triggers when either of the two trigger. This can be cascaded to combine more than two triggers.
Internal state of the result of Alternative constructions
Possible alternatives.
Subclass of Alternative that carries an error message in case of failure