Is there something like a sequel to the Arrow transformer?

ContT monad transformer has an interesting property: if there is a * -> * , such as Set , which has clearly defined monadic operations, but cannot have a Monad instance due to some restrictions (here Ord a ), you can wrap it in ContT ( ContT r Set ) to get an instance of the monad, and set aside constraints outside it, for example, when we insert Set into the ContT r Set . See Building Effective Monad Instances on Set by Continuing the Monad .

Is there something similar for arrows? A converter that will allow you to wrap an “almost arrow” in it, get a valid Arrow instance and postpone problem restrictions for the part where we insert an “almost arrow” into it?

For example, if we had the type AlmostArrow :: * -> * -> * , for which we would have the usual Arrow operations, but with restrictions such as

 arr' :: (Ord a, Ord b) => (a -> b) -> AlmostArrow ab (>>>') :: (Ord a, Ord b, Ord c) => AlmostArrow ab -> AlmostArrow bc -> AlmostArrow ac 

As a bonus, if so, is there any excellent, general method of category theory, how to get both ContT and such an arrow transformer?

+8
haskell continuations category-theory arrows monad-transformers
source share

No one has answered this question yet.

See similar questions:

28
Building efficient monad instances in `Set` (and other restricted containers) using the monad extension

or similar:

28
Building efficient monad instances in `Set` (and other restricted containers) using the monad extension
27
What does a nontrivial comonid look like?
24
To what extent are Applicative / Monad instances uniquely identified?
nineteen
Is this functor property stronger than a monad?
thirteen
Free group monad
12
How to create an applicative instance with constraints (similar to building Monad instances using ContT)
8
Haskell Monasteries: What is the name for `` (>> =) `and` (= <<) `do?
5
Coyoneda and the producing functor in Haskell
3
Explainable syntax for constrained arrow
one
Why doesn't the Haskell Functor class include a function on objects? Is this feature "clean"?

All Articles