Preface_specs.AlternativeAlternative is a kind of Monoid on Applicative. An Alternative is formally an Applicative with neutral and combine. So an Alternative is also an Applicative (and an Alt which is also a Functor).
To have a predictable behaviour, the instance of Alternative must obey some laws.
Applicative lawsAlt lawscombine x neutral = combine neutral x = xmodule type WITH_NEUTRAL_AND_COMBINE = sig ... endMinimal interfaces of Alternative without Applicative.
module type WITH_PURE_MAP_AND_PRODUCT = sig ... endMinimal definition using neutral, combine, pure, map and product.
module type WITH_PURE_AND_APPLY = sig ... endMinimal definition using neutral, combine, pure and apply.
module type WITH_PURE_AND_LIFT2 = sig ... endMinimal definition using neutral, combine, pure and lift2.
module type CORE = sig ... endBasis operations.
module type ALTERNATIVE_OPERATION = sig ... endOperation without Applicative.
module type OPERATION = sig ... endAdditional operations.
module type INFIX = sig ... endInfix operators.
module type SYNTAX = sig ... endSyntax extensions.
module type API = sig ... endThe complete interface of an Alternative.