Preface_specs.ArrowAn Arrow is an abstract view of computation sitting between Applicative and Monad. Arrow is built on the top of Category and Strong. So an Arrow is also a Category.
To have a predictable behaviour, the instance of Arrow must obey some laws.
Category lawsarrow id = idarrow (g % f) = arrow f >>> arrow gfst (arrow f) = arr (fst f)fst (f >>> g) = fst f >>> fst gfst f >>> arrow (fun (x,y) -> (x,g y)) = arrow (fun (x,y) -> (x,g y)) >>> fst ffst f >>> arrow Stdlib.fst = arrow Stdlib.fst >>> ffst (fst f) >>> arrow assoc = arrow assoc >>> fst fmodule type WITH_ARROW = sig ... endExposes the arrow function, mandatory for each requirement.
module type WITH_ARROW_AND_FST = sig ... endMinimal definition using fst.
module type WITH_ARROW_AND_SPLIT = sig ... endMinimal definition using split.
module type CORE = sig ... endBasis operations.
module type OPERATION = sig ... endAdditional operations.
module type ALIAS = sig ... endAliases of some operations functions.
module type INFIX = sig ... endInfix operators.
module type API = sig ... endThe complete interface of an Arrow.