Is there a name for the following?

Hello -- I'm wondering if there is any "name" for a functor "F" that has a function with the following type: (a -> F b) -> F (a -> b) or (F a -> F b) -> F (a -> b) If there is, I would imagine it being related to Applicative in some way, though clearly there are many Applicatives that do not have an implementation of this. Thanks. -- gregory malecha

Doubt it. What would be the instances? What resulted in this requirement? Data.Distributive might help. Just guessing. On 02/06/14 07:55, Gregory Malecha wrote:
Hello --
I'm wondering if there is any "name" for a functor "F" that has a function with the following type:
(a -> F b) -> F (a -> b)
or
(F a -> F b) -> F (a -> b)
If there is, I would imagine it being related to Applicative in some way, though clearly there are many Applicatives that do not have an implementation of this.
Thanks.
-- gregory malecha
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
-- Tony Morris http://tmorris.net/

Hi Gregory, On Sun, Jun 01, 2014 at 05:55:21PM -0400, Gregory Malecha wrote:
Hello --
I'm wondering if there is any "name" for a functor "F" that has a function with the following type:
(a -> F b) -> F (a -> b)
or
(F a -> F b) -> F (a -> b)
If there is, I would imagine it being related to Applicative in some way, though clearly there are many Applicatives that do not have an implementation of this.
As for the first type, any distributive/representable functor (http://hackage.haskell.org/package/distributive-0.4/docs/Data-Distributive.h..., http://hackage.haskell.org/package/adjunctions-4.0.3/docs/Data-Functor-Rep.h...) will have such a function---that is, when F a is isomorphic to (r -> a) for some type r. Then it is just (a -> r -> b) -> (r -> a -> b) I rather suspect that these are the *only* functors that will work, but I'm not sure how to prove it off the top of my head. Intuitively, if F does not have some fixed structure, i.e. it is isomorphic to a sum type, then (given that 'a' can be infinite) there is no way to combine the infinitely many F structures resulting from the (a -> F b) function into a single F structure on the right. Relatedly, you may be interested in http://winterkoninkje.dreamwidth.org/81209.html http://hackage.haskell.org/package/countable-0.1/docs/Data-Searchable.html#t... which are very similar, although they quantify over 'a' rather than 'F'. I do not have any good intuition about the second type. -Brent
participants (3)
-
Brent Yorgey
-
Gregory Malecha
-
Tony Morris