5

A common example used to illustrate how monads arise from adjoint functors is State. One of the reasons this is such a good example is that the two adjoint functors, (->) r and (,) r, are both endofunctors on Hask. Other canonical monads involve adjoint functors into and out of Hask (e.g., [] and Maybe), which makes them harder to appreciate for people who know Haskell, but who have less background in category theory.

Are there any other common monads that arise via adjoint endofunctors on Hask? (Obviously the Identity monad is one such case, but not a very interesting one.)

SEC
  • 799
  • 4
  • 16
  • Looking at the instances of `Adjunction` in [adjunctions](https://hackage.haskell.org/package/adjunctions), it looks like `State` and `Identity` are the only ones... Hardly a proof, and I'm no expert, but I thought this factoid was worth a comment... – Mark Seemann Oct 22 '17 at 19:17
  • The answer might be no! But it might still be useful to consider some other Hask adjoints and the monads they give rise to, even if those monads aren't well known. – SEC Oct 22 '17 at 19:28
  • 4
    I'd say no. The right-hand side of any adjunction is always representable - to wit: [`tabulateAdjunction`](https://hackage.haskell.org/package/adjunctions-4.3/docs/Data-Functor-Adjunction.html#v:tabulateAdjunction) and [`indexAdjunction`](https://hackage.haskell.org/package/adjunctions-4.3/docs/Data-Functor-Adjunction.html#v:indexAdjunction) - so all adjoint endofuctors on Hask are isomorphic to `(->) r` and `(,) r` for some `r`. (All monads can be derived as the composition of adjoint functors - just not necessarily endofunctors. Sounds like you already knew that though ) – Benjamin Hodgson Oct 22 '17 at 23:22

0 Answers0