Is there any standard name for a type constructor F :: * -> * -> * -> * with operations
return :: x -> F a a x
bind :: F a b x -> (x -> F b c y) -> F a c y
that is a contravariant functor in the first argument and a covariant functor in the second and third? In particular, does this correspond to any kind construction in category theory?
The operations give rise to a
join :: F a b (F b c x) -> F a c x
operation that makes this seem like some kind of "category in the category of endofunctors", but I'm not sure how that could be formalised.
EDIT: As chi points out, this is related to the indexed monad: given an indexed monad
F' : (* -> *) -> (* -> *)
we can use the Atkey construction
data (:=) :: * -> * -> * -> *
V :: x -> (x := a) a
and then define
F a b x = F' (x := b) a
to get the kind of monad we want. I've done the construction in Agda to check. I'd still like to know whether this more limited structure is known, though.
:=.) - Benjamin Hodgson