Arrow transformers: how to make them wright?

A Control.Arrow in base package introduces an arrow type, and ghc have good support for arrow notation. Many things, avaible in monads, are avaible in arrows as well. There is an arrows package, that introduces some arrow classes : state, reader, writer and so on. However, it does not introduce systematic lifting of arrow classes operations. Arrows are generalisation of monads. There are libraries, that introduces systematic lifting of operations from monad classes. So, the quesions are: what operations should be in arrow transformer class? Captain Obvious says, it should look at least like: class ArrowTrans t where lift :: ( Arrow a, Arrow (t a) ) => a b c -> t a b c what laws arrow transformers must obey? C.O. says, at least lift a b c >>> lift a c d == lift ( a b c >> a c d ) how to perform lifting of actions for classes like this: class Arrow a => ArrowError a e| a-> e where raise :: a e () handle :: a e c -> a b c -> a b c class Arrow a => ArrowReader a e | a -> e where look :: a () e local :: a b c -> a (b,e) c The answers lies somewhere in category theory, C.O. says. Of course, such answer is not satisfactory.

On Tue, Aug 31, 2010 at 2:07 PM, Permjacov Evgeniy
A Control.Arrow in base package introduces an arrow type, and ghc have good support for arrow notation. Many things, avaible in monads, are avaible in arrows as well. There is an arrows package, that introduces some arrow classes : state, reader, writer and so on. However, it does not introduce systematic lifting of arrow classes operations.
Are you referring to the arrows package at
http://hackage.haskell.org/package/arrows? If so, what do you mean
by "systematic lifting", because it does lift operations through the
transformers where possible.
--
Dave Menendez
participants (3)
-
Bulat Ziganshin
-
David Menendez
-
Permjacov Evgeniy