The Full Arrow Signature
From the primitive constructors of the monad or arrow signatures the following more complete set is definable.
What they do can be guessed from the naming and signatures by extrapolation from the constructors in the primitive sets.
xlsig
infix   &&& ***
signature FullArrow =
sig
include Arrow
val idarrc : unit > ('a,'a)A
val second : ('b,'c)A > (('a * 'b),('a * 'c))A
val *** : ('a,'b)A * ('c,'d)A > (('a * 'c),('b * 'd))A
val &&& : ('a,'b)A * ('a,'c)A > ('a,('b * 'c))A
val right : ('b,'c)A > (('a,'b)OR,('a,'c)OR)A
val lright : (unit > ('b,'c)A) > (('a,'b)OR,('a,'c)OR)A
val  : ('a,'c)A * ('b,'c)A > (('a,'b)OR,'c)A
val  : (unit > ('a,'c)A) * (unit > ('b,'c)A) > (('a,'b)OR,'c)A
val amerge : unit > (('a,'a)OR,'a)A
val test : ('a,bool)A > ('a, ('a,'a)OR)A
val aif : ('a,bool)A > ('a,'b)A > ('a,'b)A > ('a,'b)A
val laif : ('a,bool)A > (unit > ('a,'b)A) > (unit > ('a,'b)A) > ('a,'b)A
val foldl : ('b * 'a,'b)A > ('b * ('a list),'b)A
val foldr : ('a * 'b,'b)A > (('a list) * 'b,'b)A
val mapl : ('a,'b)A > ('a list,'b list)A
val mapr : ('a,'b)A > ('a list,'b list)A
val amap : ('a,'b)A list > ('a, 'b list)A
val vseq : ('a,'a)A list > ('a,'a)A
end


The Full Arrow Functor
xlsml
functor FullArrow (Arrow:Arrow):FullArrow =
struct
local
fun swapp (x,y) = (y,x)
fun swapu (L x) = R x
 swapu (R x) = L x
fun merge (L x) = x
 merge (R x) = x
fun id x = x
in
open Arrow
type arrextype = string
exception arrex of arrextype
fun idarrc v = arr (fn x=>x)
fun second f = (arr swapp) >>> first f >>> (arr swapp)
fun op *** (f,g) = first f >>> second g
fun op &&& (f,g) = arr (fn x=> (x,x)) >>> (f *** g)
fun right f = (arr swapu) >>> left f >>> (arr swapu)
fun lright f = (arr swapu) >>> lleft f >>> (arr swapu)
fun op  (f,g) = left f >>> right g >>> (arr merge)
fun op  (f,g) = lleft f >>> lright g >>> (arr merge)
fun amerge x = arr merge
fun test f = (f &&& arr id) >>>
arr (fn (b,a)=> if b then L a else R a)
fun aif t a1 a2 = (test t) >>> (a1  a2)
fun laif t a1 a2 = (test t) >>> (a1  a2)
fun foldl farr = aif (arr (fn (_,y) => null y))
(arr (fn (x,y) => x))
(((arr (fn (ib,h::_) => (ib,h)
 _ => raise arrex "foldl matching problem")
>>> farr)
&&& arr (fn (_,_::t) => t
 _ => raise arrex "foldl matching problem")
)
>>> foldl farr
)
fun foldr farr = aif (arr (fn (x,_) => null x))
(arr (fn (x,y) => y))
((arr (fn (_::t,_) => t  _ => raise arrex "foldr matching problem")
&&& (arr (fn (h::_,ib) => (h,ib)
 _ => raise arrex "foldr matching problem")
>>> farr)
)
>>> foldr farr
)
fun mapl a = ((arr (fn _=>[])) &&& arr id)
>>> foldl ((second a)>>>(arr (fn (x,y)=> y::x)))
fun mapr a = (arr id &&& (arr (fn _=>[])))
>>> foldr ((first a)>>>(arr (fn (x,y)=> x::y)))
fun amap (a::alist) = (a &&& (amap alist)) >>> (arr (op ::))
 amap [] = arr (fn x=> [])
fun vseq (a::alist) = a >>> (vseq alist)
 vseq [] = arr id
end
end


Exception Arrow Signature

State Arrow Signature
This is like a full arrow except that it has an arrow for reading/updating the state.

The State Arrow Functor

Basic State Exception Arrow Signature
This is like a state arrow except that it has exception raising and handling.

Basic State Exception Arrow Functor

Full State Exception Arrow Signature
xlsig
signature FullStateXArrow =
sig
include StateXArrow
val read_state: (unit,state)A
val write_state: (state,unit)A
val unlessfail: (('a,'b)A * (unit > ('b,'c)A) * (unit > ('a,'c)A)) > ('a,'c)A
val firstsucc: ('a,'b)A list > ('a,'b)A
val frepeat: ('a,'a)A > ('a,'a)A
val brepeat: ('a,'b)A > ('a,'b list)A
val frepeat1p: ('a,'a)A > ('a,'a)A
val brepeat1p: ('a,'b)A > ('a,'b list)A
end


Full State Exception Arrow Functor
xlsml
local open XlTools
in
functor FullStateXArrow (StateXMonad:StateXMonad):FullStateXArrow =
struct
structure StateXArrow = StateXArrow(StateXMonad)
open StateXArrow
val read_state:(unit,state)A = sarr (fn (state,_) => (state,state))
val write_state = sarr (fn (_,x) => ((),x))
fun unlessfail (fa,a1c,a2c) = (catchfail ((fa >>> arr L), fn fi=> (a2c ()) >>> arr R))
>>> (lleft a1c) >>> amerge ()
fun firstsucc (a::al) = unlessfail (a, idarrc, fn x=> firstsucc al)
 firstsucc [] = fail "firstsucc: all alternatives failed"
fun frepeat a = unlessfail (a, fn _=> (frepeat a), idarrc)
fun brepeat a = unlessfail (a &&& arr id,
fn _=> second (brepeat a) >>> arr (op ::),
fn _=> arr (fn y=> []))
fun frepeat1p a = a >>> (frepeat a)
fun brepeat1p a = (a &&& arr id) >>> (second (brepeat a)) >>> arr (op ::)
end
end


Structure VectorParseArrow
xlsml
structure VectorParseArrow = FullArrow(Kleisli(InStreamMonad(XlVectorStream)));


