New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(comment thread) The adjunction that induces the Reader monad #19

Open
runarorama opened this Issue Sep 30, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@runarorama
Owner

runarorama commented Sep 30, 2015

No description provided.

@gasche

This comment has been minimized.

Show comment
Hide comment
@gasche

gasche Sep 30, 2015

There are several ways to turn a given monad into an adjunction, which give different adjunctions. One of them is rather trivial: if you go to the Kleisli category (whose arrows A -> B are just the A -> M B of the original category), and then come back through the forgetful functor, you have an adjunction. I think that the corresponding comonad is just the identity, which is quite boring. The Kleisli category gives the "initial" adjunction for your monad, and the "terminal" adjunction is given by the Eilenberg-Moore category of the monad -- a bit less simple, but it also works in all cases.

I believe that neither of those two constructions coincide with the one given in the StackOverflow answer, which is in a sense "more interesting". I don't know where it comes from, but I would bet it is from a non-trivial reflection on this particular monad, rather than by mechanically applying a technique that would work for any monad (like the Kleisli and Eilenberg-Moore constructions).

gasche commented Sep 30, 2015

There are several ways to turn a given monad into an adjunction, which give different adjunctions. One of them is rather trivial: if you go to the Kleisli category (whose arrows A -> B are just the A -> M B of the original category), and then come back through the forgetful functor, you have an adjunction. I think that the corresponding comonad is just the identity, which is quite boring. The Kleisli category gives the "initial" adjunction for your monad, and the "terminal" adjunction is given by the Eilenberg-Moore category of the monad -- a bit less simple, but it also works in all cases.

I believe that neither of those two constructions coincide with the one given in the StackOverflow answer, which is in a sense "more interesting". I don't know where it comes from, but I would bet it is from a non-trivial reflection on this particular monad, rather than by mechanically applying a technique that would work for any monad (like the Kleisli and Eilenberg-Moore constructions).

@runarorama

This comment has been minimized.

Show comment
Hide comment
@runarorama

runarorama Sep 30, 2015

Owner

Yeah, we had considered the Kleisli and Eilenberg-Moore constructions, but since that works in every case it's not very interesting and it seemed dissatisfying that Reader would be "prime" in that sense. I guess the construction given here is only slightly more interesting, but it seems like it's just the curry/uncurry adjunction with constraints bolted on to make it work. Rather like saying "Reader is just State without put". Although I suppose it's some comfort that this construction only works with this particular monad.

Owner

runarorama commented Sep 30, 2015

Yeah, we had considered the Kleisli and Eilenberg-Moore constructions, but since that works in every case it's not very interesting and it seemed dissatisfying that Reader would be "prime" in that sense. I guess the construction given here is only slightly more interesting, but it seems like it's just the curry/uncurry adjunction with constraints bolted on to make it work. Rather like saying "Reader is just State without put". Although I suppose it's some comfort that this construction only works with this particular monad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment