
I'm working on a radically different way of looking at IO. Before I post it and make a fool of myself, I'd appreciate a reality check on the following points: a) Can IO be thought of as a category? I think the answer is yes. b) If it is a category, what are its morphisms? I think the answer is: it has no morphisms. The morphisms available are natural transformations or functors, and thus not /in/ the category. Alternatively: we have no means of directly naming its values, so the only way we can operate on its values is to use morphisms from the outside (operating on construction expressions qua morphisms.) c) All categories with no morphisms ("bereft categories"?) are isomorphic (to each other). I think yes. Thanks, gregg

I truly have no idea what you are saying (and probably not even what I am saying), but I suspect: a) You are calling IO the target category of applying the functor IO [taking a to IO a and (a->b) to (IO a -> IO b)] to Hask. b) This category is hardly bereft, nor discrete. Its morphisms are IO a -> IO b. Maybe you are thinking that it becomes an empty category after some fixed point process where you strip off the IO with repeated joins (or runIOs)? Remember there can be arbitrarily many nestings of IO, so that main :: IO (IO (IO Int)) is (a program that when run returns)^3 an Int. This is a stream with no finite least fixed point. c) What you are calling a "bereft" category is an empty category. Without (identity) morphisms, there can be no objects. There is only one such category (the empty category), so naturally any two such are isomorphic (for what it's worth, which I suspect is not much). Dan Gregg Reynolds wrote:
I'm working on a radically different way of looking at IO. Before I post it and make a fool of myself, I'd appreciate a reality check on the following points:
a) Can IO be thought of as a category? I think the answer is yes.
b) If it is a category, what are its morphisms? I think the answer is: it has no morphisms. The morphisms available are natural transformations or functors, and thus not /in/ the category. Alternatively: we have no means of directly naming its values, so the only way we can operate on its values is to use morphisms from the outside (operating on construction expressions qua morphisms.)
c) All categories with no morphisms ("bereft categories"?) are isomorphic (to each other). I think yes.
Thanks,
gregg _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Thu, Feb 5, 2009 at 10:32 PM, Dan Weston
I truly have no idea what you are saying (and probably not even what I am saying), but I suspect:
a) You are calling IO the target category of applying the functor IO [taking a to IO a and (a->b) to (IO a -> IO b)] to Hask.
b) This category is hardly bereft, nor discrete. Its morphisms are IO a -> IO b.
Well, that's a function in Haskell, yes; but does it represent a morphism /in/ the category? It looks more like a Functor morphism to me.
c) What you are calling a "bereft" category is an empty category. Without (identity) morphisms, there can be no objects. There is only one such
Right, I meant other than Id morphisms. I guess "discrete" is the correct term.
category (the empty category), so naturally any two such are isomorphic (for what it's worth, which I suspect is not much).
Thanks, g

On 6 Feb 2009, at 05:52, Gregg Reynolds wrote:
I'm working on a radically different way of looking at IO. Before I post it and make a fool of myself, I'd appreciate a reality check on the following points:
a) Can IO be thought of as a category? I think the answer is yes.
What couldn't? Everything could be thought of as category, linear space, graph or matroid - you'll need some intellectual efforts for that, but it certainly could be done.
b) If it is a category, what are its morphisms? I think the answer is: it has no morphisms.
Oops. Than it's empty. In a category, every object has at least an identity morphism.
c) All categories with no morphisms ("bereft categories"?) are isomorphic (to each other). I think yes.
Yes, all empty categories are isomorphic. No, categories with identity morphisms only are not isomorphic in general. Yes, all categories with no morphisms except identities are equivalent. No, such categories are not very useful and there is no need to apply categorical language to them - thinking in terms of set (class) of objects would be easier.

On Thu, 2009-02-05 at 20:52 -0600, Gregg Reynolds wrote:
I'm working on a radically different way of looking at IO. Before I post it and make a fool of myself, I'd appreciate a reality check on the following points:
a) Can IO be thought of as a category? I think the answer is yes.
No. At least not in any reasonable way.
b) If it is a category, what are its morphisms? I think the answer is: it has no morphisms. The morphisms available are natural transformations or functors, and thus not /in/ the category. Alternatively: we have no means of directly naming its values, so the only way we can operate on its values is to use morphisms from the outside (operating on construction expressions qua morphisms.)
N/A
c) All categories with no morphisms ("bereft categories"?) are isomorphic (to each other). I think yes.
No. "Discrete" categories which you seem to be talking about are isomorphic to sets (namely their set of objects). Not all sets are isomorphic.
participants (4)
-
Dan Weston
-
Derek Elkins
-
Gregg Reynolds
-
Miguel Mitrofanov