<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-11295132.post5798722270156006834..comments</id><updated>2009-12-08T21:35:01.096-08:00</updated><title type='text'>Comments on A Neighborhood of Infinity: Beyond Monads</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.sigfpe.com/feeds/5798722270156006834/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2009/02/beyond-monads.html'/><author><name>sigfpe</name><uri>http://www.blogger.com/profile/08096190433222340957</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>23</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-11295132.post-5132894057307476275</id><published>2009-02-26T17:06:00.000-08:00</published><updated>2009-02-26T17:06:00.000-08:00</updated><title type='text'>mike,I still haven't got around to thinking for my...</title><content type='html'>mike,&lt;BR/&gt;&lt;BR/&gt;I still haven't got around to thinking for myself about what this construction is from a category theoretical perspective. End(C) was just a guess based on ordinary monads being monoids. I'll have to return to this when I have a moment.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/5132894057307476275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/5132894057307476275'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2009/02/beyond-monads.html?showComment=1235696760000#c5132894057307476275' title=''/><author><name>sigfpe</name><uri>http://www.blogger.com/profile/08096190433222340957</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09401818062305273147'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2009/02/beyond-monads.html' ref='tag:blogger.com,1999:blog-11295132.post-5798722270156006834' source='http://www.blogger.com/feeds/11295132/posts/default/5798722270156006834' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-8394868375577042271</id><published>2009-02-26T16:46:00.000-08:00</published><updated>2009-02-26T16:46:00.000-08:00</updated><title type='text'>sigfpe,In a normal monad, bind has type  m a -&gt; ( ...</title><content type='html'>sigfpe,&lt;BR/&gt;&lt;BR/&gt;In a normal monad, bind has type&lt;BR/&gt;  m a -&amp;gt; ( a -&amp;gt; m b ) -&amp;gt; m b&lt;BR/&gt;where m:C -&amp;gt; C is a functor and a,b in C.&lt;BR/&gt;&lt;BR/&gt;Your bind has type&lt;BR/&gt;  ( m s1 s2 ) a -&amp;gt; &lt;BR/&gt;        ( a -&amp;gt; (m s1 s2) b ) -&amp;gt; ( m s1 s2 ) b,&lt;BR/&gt;where &lt;BR/&gt;   a,b in C, &lt;BR/&gt;   s1, s2 in S, &lt;BR/&gt;and (ostensibly) &lt;BR/&gt;   m(s1, s2):C -&amp;gt; C.&lt;BR/&gt;&lt;BR/&gt;So you have a different functor from C to C for each pair (s1, s2) in S.  However, you also forbid composition of such functors unless the types match, so the functors aren&amp;#39;t really from C to C, they&amp;#39;re from s1 x C to s2 x C.  &lt;BR/&gt;&lt;BR/&gt;This means you can&amp;#39;t possibly be describing a category object in End(C).  You have a 2-category whose objects are copies of C indexed by elements of S, functors between the categories, and natural morphisms between the functors.&lt;BR/&gt;&lt;BR/&gt;It&amp;#39;s a lovely construction, and well illustrated, just not the one you might have thought you were getting.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/8394868375577042271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/8394868375577042271'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2009/02/beyond-monads.html?showComment=1235695560000#c8394868375577042271' title=''/><author><name>mike</name><uri>http://www.blogger.com/profile/03408641732412584050</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2009/02/beyond-monads.html' ref='tag:blogger.com,1999:blog-11295132.post-5798722270156006834' source='http://www.blogger.com/feeds/11295132/posts/default/5798722270156006834' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-4723437248414012011</id><published>2009-02-24T03:23:00.000-08:00</published><updated>2009-02-24T03:23:00.000-08:00</updated><title type='text'>Better late than never :Phttp://groups.google.com/...</title><content type='html'>Better late than never :P&lt;BR/&gt;&lt;BR/&gt;http://groups.google.com/group/comp.lang.haskell/browse_thread/thread/98384971db91201e/44a51f58ebb6c6ad#44a51f58ebb6c6ad</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/4723437248414012011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/4723437248414012011'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2009/02/beyond-monads.html?showComment=1235474580000#c4723437248414012011' title=''/><author><name>Dan</name><uri>http://www.blogger.com/profile/02467793406608705828</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2009/02/beyond-monads.html' ref='tag:blogger.com,1999:blog-11295132.post-5798722270156006834' source='http://www.blogger.com/feeds/11295132/posts/default/5798722270156006834' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-3093805588074968994</id><published>2009-02-18T12:04:00.000-08:00</published><updated>2009-02-18T12:04:00.000-08:00</updated><title type='text'>mike,Haven't digested all of your comment yet. But...</title><content type='html'>mike,&lt;BR/&gt;&lt;BR/&gt;Haven't digested all of your comment yet. But briefly, a category object in End(C) is exactly what I'm thinking of. But I haven't expanded out the full definition myself to ensure all of the maps are exactly what they need to be.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/3093805588074968994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/3093805588074968994'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2009/02/beyond-monads.html?showComment=1234987440000#c3093805588074968994' title=''/><author><name>sigfpe</name><uri>http://www.blogger.com/profile/08096190433222340957</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09401818062305273147'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2009/02/beyond-monads.html' ref='tag:blogger.com,1999:blog-11295132.post-5798722270156006834' source='http://www.blogger.com/feeds/11295132/posts/default/5798722270156006834' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-4885042722208950236</id><published>2009-02-18T11:35:00.000-08:00</published><updated>2009-02-18T11:35:00.000-08:00</updated><title type='text'>A category object in Set consists of:- two sets O ...</title><content type='html'>A category object in Set consists of:&lt;BR/&gt;- two sets O and M (objects and morphisms)&lt;BR/&gt;- a function i:O -&amp;gt; M (picks out the identity morphism)&lt;BR/&gt;- two functions s,t:M -&amp;gt; O (source and target)&lt;BR/&gt;- a function o:X -&amp;gt; M (composition), where X is a set equipped with two functions i,j:X -&amp;gt; M such that s o i = t o j (that is, it&amp;#39;s the set of composable pairs and i,j pick out the first or second element)&lt;BR/&gt;such that the usual relations hold.&lt;BR/&gt;&lt;BR/&gt;Category objects can be defined in any category with pairwise pullbacks:&lt;BR/&gt;&lt;BR/&gt;A category object in C consists of&lt;BR/&gt;- two objects O, M&lt;BR/&gt;- a morphism i:O -&amp;gt; M&lt;BR/&gt;- two morphisms s, t:M -&amp;gt; O&lt;BR/&gt;- a morphism o:X -&amp;gt; M where X is equipped with two morphisms i,j:X -&amp;gt; M s.t. s o i = t o j&lt;BR/&gt;such that the usual relations hold.&lt;BR/&gt;&lt;BR/&gt;The generalization you describe is as follows:&lt;BR/&gt;&lt;BR/&gt;A &amp;quot;parametrized monad&amp;quot; consists of&lt;BR/&gt;- two sets O, M (where the elements of O are categories and the elements of M are functors between them)&lt;BR/&gt;- a function i:O -&amp;gt; M (picking out the identity functor on each category)&lt;BR/&gt;- two functions s,t:M -&amp;gt; O (source and target of the functors)&lt;BR/&gt;- a function o:X -&amp;gt; M (composition of functors)&lt;BR/&gt;&lt;BR/&gt;But this is just a subcategory of Cat!  What&amp;#39;s going on? Just as a monoid is a one-object category, a monoidal category is a one-object 2-category.  The generalization you describe moves from the monoidal category End(C) to a 2-category with more objects.  So the real term you want isn&amp;#39;t &amp;quot;parameterized monad&amp;quot;, it&amp;#39;s &amp;quot;sub-2-category of Cat&amp;quot;. &lt;BR/&gt;&lt;BR/&gt;A different generalization would be to consider a category object in End(C):&lt;BR/&gt;&lt;BR/&gt;A category object in End(C) consists of&lt;BR/&gt;- two functors O, M&lt;BR/&gt;- a natural transformation i:O -&amp;gt; M&lt;BR/&gt;- two natural transformations s, t:M -&amp;gt; O&lt;BR/&gt;- a natural transformation o:X -&amp;gt; M where the functor X is equipped with two natural transformations i,j:X -&amp;gt; M s.t. s o i = t o j&lt;BR/&gt;such that the usual relations hold.&lt;BR/&gt;&lt;BR/&gt;Can you come up with a use case for this one?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/4885042722208950236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/4885042722208950236'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2009/02/beyond-monads.html?showComment=1234985700000#c4885042722208950236' title=''/><author><name>mike</name><uri>http://www.blogger.com/profile/03408641732412584050</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2009/02/beyond-monads.html' ref='tag:blogger.com,1999:blog-11295132.post-5798722270156006834' source='http://www.blogger.com/feeds/11295132/posts/default/5798722270156006834' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-2624464312346500163</id><published>2009-02-17T17:50:00.000-08:00</published><updated>2009-02-17T17:50:00.000-08:00</updated><title type='text'>Ryan,I think "Indexed monad" and IxMonad are much ...</title><content type='html'>Ryan,&lt;BR/&gt;&lt;BR/&gt;I think "Indexed monad" and IxMonad are much better names. I'll check out Tov's session types paper.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/2624464312346500163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/2624464312346500163'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2009/02/beyond-monads.html?showComment=1234921800000#c2624464312346500163' title=''/><author><name>sigfpe</name><uri>http://www.blogger.com/profile/08096190433222340957</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09401818062305273147'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2009/02/beyond-monads.html' ref='tag:blogger.com,1999:blog-11295132.post-5798722270156006834' source='http://www.blogger.com/feeds/11295132/posts/default/5798722270156006834' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-8758684201643177240</id><published>2009-02-17T17:31:00.000-08:00</published><updated>2009-02-17T17:31:00.000-08:00</updated><title type='text'>Parametrized monads were also used in a Haskell Wo...</title><content type='html'>Parametrized monads were also used in a Haskell Workshop 2008 paper with the name "class Monadish".&lt;BR/&gt;&lt;BR/&gt;An implementation of the concept is available at http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Coroutine</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/8758684201643177240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/8758684201643177240'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2009/02/beyond-monads.html?showComment=1234920660000#c8758684201643177240' title=''/><author><name>Ryan Ingram</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2009/02/beyond-monads.html' ref='tag:blogger.com,1999:blog-11295132.post-5798722270156006834' source='http://www.blogger.com/feeds/11295132/posts/default/5798722270156006834' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-4203489247232792851</id><published>2009-02-15T11:22:00.000-08:00</published><updated>2009-02-15T11:22:00.000-08:00</updated><title type='text'>I've been mucking about with functors between slic...</title><content type='html'>I&amp;#39;ve been mucking about with functors between slice categories. Er, um,&lt;BR/&gt;&lt;BR/&gt;type x :-&amp;gt;: y = forall i. x i -&amp;gt; y i&lt;BR/&gt;&lt;BR/&gt;class IFunctor (t :: (* -&amp;gt; *) -&amp;gt; * -&amp;gt; *) where&lt;BR/&gt;  imap :: (x :-&amp;gt;: y) -&amp;gt; (t x :-&amp;gt;: t y)&lt;BR/&gt;&lt;BR/&gt;To me this suggests.&lt;BR/&gt;&lt;BR/&gt;class IMonad (t ::  (* -&amp;gt; *) -&amp;gt; * -&amp;gt; *) where&lt;BR/&gt;  iret :: x :-&amp;gt;: t x&lt;BR/&gt;  ibind :: (x :-&amp;gt;: t y) -&amp;gt; (t x :-&amp;gt;: t y)&lt;BR/&gt;&lt;BR/&gt;Can we get back these domino-style parametrized monads?&lt;BR/&gt;&lt;BR/&gt;Seems so.&lt;BR/&gt;&lt;BR/&gt;data ILike :: * -&amp;gt; * -&amp;gt; * -&amp;gt; * where&lt;BR/&gt;  ILike :: x -&amp;gt; ILike x i i&lt;BR/&gt;&lt;BR/&gt;type Domino t i j x = t (ILike x j) i&lt;BR/&gt;&lt;BR/&gt;dret :: IMonad t =&amp;gt; x -&amp;gt; Domino t i i x&lt;BR/&gt;dret = iret . ILike&lt;BR/&gt;&lt;BR/&gt;iTweak :: (x -&amp;gt; Domino t j k y) -&amp;gt; (ILike x j :-&amp;gt;: t (ILike y k))&lt;BR/&gt;iTweak f (ILike x) = f x&lt;BR/&gt;&lt;BR/&gt;dbind :: IMonad t =&amp;gt; (x -&amp;gt; Domino t j k y) -&amp;gt; Domino t i j x -&amp;gt; Domino t i k y&lt;BR/&gt;dbind f b = ibind (iTweak f) b&lt;BR/&gt;&lt;BR/&gt;Not sure where I&amp;#39;m going with this. Just thought I&amp;#39;d mention it. I detect traces of Dr Hancock...</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/4203489247232792851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/4203489247232792851'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2009/02/beyond-monads.html?showComment=1234725720000#c4203489247232792851' title=''/><author><name>Conor</name><uri>http://strictlypositive.org</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2009/02/beyond-monads.html' ref='tag:blogger.com,1999:blog-11295132.post-5798722270156006834' source='http://www.blogger.com/feeds/11295132/posts/default/5798722270156006834' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-4459527159438180410</id><published>2009-02-15T08:49:00.000-08:00</published><updated>2009-02-15T08:49:00.000-08:00</updated><title type='text'>augustss,It'd be easy to test to see what many of ...</title><content type='html'>augustss,&lt;BR/&gt;&lt;BR/&gt;It'd be easy to test to see what many of the consequences might be: try recompiling a non-trivial body of code with a parameterised monad library.&lt;BR/&gt;&lt;BR/&gt;My main concern is with monad transformers. The types of the parameterised version will carry a lot of information. We could start getting some pretty big signatures.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/4459527159438180410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/4459527159438180410'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2009/02/beyond-monads.html?showComment=1234716540000#c4459527159438180410' title=''/><author><name>sigfpe</name><uri>http://www.blogger.com/profile/08096190433222340957</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09401818062305273147'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2009/02/beyond-monads.html' ref='tag:blogger.com,1999:blog-11295132.post-5798722270156006834' source='http://www.blogger.com/feeds/11295132/posts/default/5798722270156006834' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-1482980901816994455</id><published>2009-02-15T08:26:00.000-08:00</published><updated>2009-02-15T08:26:00.000-08:00</updated><title type='text'>Augustss:   My experience has been both.   Sometim...</title><content type='html'>Augustss:   My experience has been both.   Sometimes you do get impenetrable error messages;   often because some definition you got wrong a page or two of code ago actually does typecheck,  whereas it wouldn't have previously.&lt;BR/&gt;&lt;BR/&gt;I quickly learned to frequently use ghci to infer the most general type of new definitions.   If the type appeared to be right,  I'd copy and paste it into my code,  if it was obviously wrong,  I'd try again. When problems arose,  sometimes it took a fair bit of mental effort to figure out exactly what they were. &lt;BR/&gt;&lt;BR/&gt;There is definitely higher type overhead,  at least in the short run.   But it puts the type system to better work _for you_,  among other compelling advantages.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/1482980901816994455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/1482980901816994455'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2009/02/beyond-monads.html?showComment=1234715160000#c1482980901816994455' title=''/><author><name>Leon Smith</name><uri>http://www.blogger.com/profile/06462854866941248768</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2009/02/beyond-monads.html' ref='tag:blogger.com,1999:blog-11295132.post-5798722270156006834' source='http://www.blogger.com/feeds/11295132/posts/default/5798722270156006834' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-4705148061044504733</id><published>2009-02-15T05:58:00.000-08:00</published><updated>2009-02-15T05:58:00.000-08:00</updated><title type='text'>GHC supports do-notation for parameterized monads ...</title><content type='html'>GHC supports do-notation for parameterized monads just fine, as it turns out.&lt;BR/&gt;&lt;BR/&gt;I tried to write some code here to show you how to do it but Blogger doesn't allow me to use the proper tags when commenting so it will just look like crap. Instead here is a link to &lt;A HREF="http://computationalthoughts.blogspot.com/2009/02/comment-on-parameterized-monads.html" REL="nofollow"&gt;my blog&lt;/A&gt; which shows how to do it.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/4705148061044504733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/4705148061044504733'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2009/02/beyond-monads.html?showComment=1234706280000#c4705148061044504733' title=''/><author><name>Josef</name><uri>http://www.blogger.com/profile/13272830598221833253</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2009/02/beyond-monads.html' ref='tag:blogger.com,1999:blog-11295132.post-5798722270156006834' source='http://www.blogger.com/feeds/11295132/posts/default/5798722270156006834' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-8909312559681812736</id><published>2009-02-15T05:27:00.000-08:00</published><updated>2009-02-15T05:27:00.000-08:00</updated><title type='text'>GHC does support do-notation for parameterised mon...</title><content type='html'>GHC &lt;B&gt;does&lt;/B&gt; support do-notation for parameterised monads.  With GHC 6.10 (at least) you merely need to use {-# LANGUAGE NoImplicitPrelude #-}&lt;BR/&gt;and GHC will resolve do-notation to use whatever is in scope for (&amp;gt;&amp;gt;=), (&amp;gt;&amp;gt;) and &amp;quot;return&amp;quot;.  Parameterised monads are also used in Oleg et al&amp;#39;s lightweight static resources paper.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/8909312559681812736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/8909312559681812736'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2009/02/beyond-monads.html?showComment=1234704420000#c8909312559681812736' title=''/><author><name>Thomas Schilling</name><uri>http://www.blogger.com/profile/04274984206279511399</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2009/02/beyond-monads.html' ref='tag:blogger.com,1999:blog-11295132.post-5798722270156006834' source='http://www.blogger.com/feeds/11295132/posts/default/5798722270156006834' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-8788070984865720477</id><published>2009-02-15T05:20:00.000-08:00</published><updated>2009-02-15T05:20:00.000-08:00</updated><title type='text'>"At the very least, do-notation needs to be adapte...</title><content type='html'>&amp;quot;At the very least, do-notation needs to be adapted to support ParameterisedMonad. &amp;quot;&lt;BR/&gt;&lt;BR/&gt;This is already possible in Ghc using -XNoImplicitPrelude or the corresponding LANGUAGE pragma.&lt;BR/&gt;&lt;BR/&gt;---&lt;BR/&gt;&lt;BR/&gt;Just for fun, let me try to continue with your idea. Instead of taking (&amp;gt;&amp;gt;=) as a primitive, I prefer fmap, join and Applicative stuff. So:&lt;BR/&gt;&lt;BR/&gt;&amp;gt; class ParameterisedFunctor m where&lt;BR/&gt;&amp;gt;    fmap :: (a -&amp;gt; b) -&amp;gt; (m s s a) -&amp;gt; (m s s b)&lt;BR/&gt;&amp;gt; &lt;BR/&gt;&amp;gt; class ParameterisedFunctor m =&amp;gt; ParameterisedPointed m where&lt;BR/&gt;&amp;gt;    pure :: a -&amp;gt; m s s a&lt;BR/&gt;&amp;gt; &lt;BR/&gt;&amp;gt; class ParameterisedPointed m =&amp;gt; ParameterisedApplicative m where&lt;BR/&gt;&amp;gt;    (&amp;lt;*&amp;gt;) :: m s1 s2 (a -&amp;gt; b) -&amp;gt; m s2 s3 a -&amp;gt; m s1 s3 b&lt;BR/&gt;&amp;gt; &lt;BR/&gt;&amp;gt; class ParameterisedApplicative m =&amp;gt; ParameterisedMonad m where&lt;BR/&gt;&amp;gt;    join :: m s1 s2 (m s2 s3 a) -&amp;gt; m s1 s3 a&lt;BR/&gt;&lt;BR/&gt;Now take the ParameterisedApplicative class. For normal Applicatives there is a Dual instance that reverses the order of effects, i.e.:&lt;BR/&gt;&lt;BR/&gt;&amp;gt; (&amp;lt;**&amp;gt;) :: m a -&amp;gt; m (a -&amp;gt; b) -&amp;gt; m b&lt;BR/&gt;&lt;BR/&gt;Here the reversed ordering is not clear from the type. However, with ParameterizedApplicative:&lt;BR/&gt;&lt;BR/&gt;&amp;gt; (&amp;lt;**&amp;gt;) :: m s1 s2 a -&amp;gt; m s2 s3 (a -&amp;gt; b) -&amp;gt; m s1 s3 b&lt;BR/&gt;&lt;BR/&gt;We &lt;I&gt;do&lt;/I&gt; see the ordering of effects in the type.&lt;BR/&gt;&lt;BR/&gt;---&lt;BR/&gt;&lt;BR/&gt;Also, the type &amp;quot;m s1 s2 a&amp;quot; reminds me a lot of the types of Control.Category. Is there something equivalent to the Kleisli wrapper?&lt;BR/&gt;&lt;BR/&gt;&amp;gt; newtype Kleisli m a b = Kleisli &lt;BR/&gt;(a -&amp;gt; m b)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/8788070984865720477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/8788070984865720477'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2009/02/beyond-monads.html?showComment=1234704000000#c8788070984865720477' title=''/><author><name>Twan van Laarhoven</name><uri>http://www.blogger.com/profile/18138442561179666544</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2009/02/beyond-monads.html' ref='tag:blogger.com,1999:blog-11295132.post-5798722270156006834' source='http://www.blogger.com/feeds/11295132/posts/default/5798722270156006834' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-3795505642045842567</id><published>2009-02-15T03:51:00.000-08:00</published><updated>2009-02-15T03:51:00.000-08:00</updated><title type='text'>MIND = BLOWNThis is awesome stuff!</title><content type='html'>MIND = BLOWN&lt;BR/&gt;&lt;BR/&gt;This is awesome stuff!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/3795505642045842567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/3795505642045842567'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2009/02/beyond-monads.html?showComment=1234698660000#c3795505642045842567' title=''/><author><name>Bonus</name><uri>http://www.blogger.com/profile/02725486955962218311</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2009/02/beyond-monads.html' ref='tag:blogger.com,1999:blog-11295132.post-5798722270156006834' source='http://www.blogger.com/feeds/11295132/posts/default/5798722270156006834' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-1064509115306791127</id><published>2009-02-15T03:45:00.000-08:00</published><updated>2009-02-15T03:45:00.000-08:00</updated><title type='text'>Just to note that some Haskell programmers were us...</title><content type='html'>Just to note that some Haskell programmers were using this extended notion of ParametrisedMonad even before the do-notation was standardised.  For instance, back in 1994-5, Niklas Röjemo used this idiom extensively inside the nhc12 and nhc13 compilers.  See &lt;A HREF="http://darcs.haskell.org/york-compiler98/State.hs" REL="nofollow"&gt;here&lt;/A&gt; for evidence.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/1064509115306791127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/1064509115306791127'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2009/02/beyond-monads.html?showComment=1234698300000#c1064509115306791127' title=''/><author><name>malcolm</name><uri>http://www.blogger.com/profile/08863672971675777868</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2009/02/beyond-monads.html' ref='tag:blogger.com,1999:blog-11295132.post-5798722270156006834' source='http://www.blogger.com/feeds/11295132/posts/default/5798722270156006834' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-8137914564466300369</id><published>2009-02-15T03:36:00.000-08:00</published><updated>2009-02-15T03:36:00.000-08:00</updated><title type='text'>I agree. I always wanted monads to be more flexibl...</title><content type='html'>I agree. I always wanted monads to be more flexible, but as not so experienced Haskell programmer I thought it is something wrong with me since hackers of Haskell would have seen it a long time ago, wouldn't they? I feel relieved (a little bit ^^). Thank you sigfpe!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/8137914564466300369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/8137914564466300369'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2009/02/beyond-monads.html?showComment=1234697760000#c8137914564466300369' title=''/><author><name>dtldarek</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2009/02/beyond-monads.html' ref='tag:blogger.com,1999:blog-11295132.post-5798722270156006834' source='http://www.blogger.com/feeds/11295132/posts/default/5798722270156006834' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-4264509095516753770</id><published>2009-02-15T03:17:00.000-08:00</published><updated>2009-02-15T03:17:00.000-08:00</updated><title type='text'>Dan, have you tried to use do-notation with this d...</title><content type='html'>Dan, have you tried to use do-notation with this definition of Parameterised Monads ? If so, what was the problem? Since GHC supports rebindable syntax, do-notation should just work when throwing in a NoImplicitPrelude pragma.&lt;BR/&gt;&lt;BR/&gt;This is related to a (wilder) notion of parameterised monads that Edward Kmett &lt;A HREF="http://comonad.com/reader/2007/parameterized-monads-in-haskell/" REL="nofollow"&gt;gave&lt;/A&gt; some time ago.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/4264509095516753770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/4264509095516753770'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2009/02/beyond-monads.html?showComment=1234696620000#c4264509095516753770' title=''/><author><name>Pepe Iborra</name><uri>http://www.blogger.com/profile/07317126950309336541</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2009/02/beyond-monads.html' ref='tag:blogger.com,1999:blog-11295132.post-5798722270156006834' source='http://www.blogger.com/feeds/11295132/posts/default/5798722270156006834' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-551597004726440519</id><published>2009-02-15T02:52:00.000-08:00</published><updated>2009-02-15T02:52:00.000-08:00</updated><title type='text'>ParametrizedMonad is indeed a very useful abstract...</title><content type='html'>ParametrizedMonad is indeed a very useful abstraction.  But it makes me wonder what happens to type inference and to error messages.  I just don't know the answer.&lt;BR/&gt;&lt;BR/&gt;Can the extra flexibility cause ambiguities?&lt;BR/&gt;&lt;BR/&gt;What happens when one makes an error?  Might it still type check?  Or give an even stranger type error?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/551597004726440519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/551597004726440519'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2009/02/beyond-monads.html?showComment=1234695120000#c551597004726440519' title=''/><author><name>augustss</name><uri>http://www.blogger.com/profile/07327620522294658036</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2009/02/beyond-monads.html' ref='tag:blogger.com,1999:blog-11295132.post-5798722270156006834' source='http://www.blogger.com/feeds/11295132/posts/default/5798722270156006834' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-5536743426100800742</id><published>2009-02-15T01:55:00.000-08:00</published><updated>2009-02-15T01:55:00.000-08:00</updated><title type='text'>To get do-notation, can't you just use NoImplicitP...</title><content type='html'>To get do-notation, can't you just use NoImplicitPrelude?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/5536743426100800742'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/5536743426100800742'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2009/02/beyond-monads.html?showComment=1234691700000#c5536743426100800742' title=''/><author><name>Ganesh Sittampalam</name><uri>http://www.blogger.com/profile/16862546723726662511</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2009/02/beyond-monads.html' ref='tag:blogger.com,1999:blog-11295132.post-5798722270156006834' source='http://www.blogger.com/feeds/11295132/posts/default/5798722270156006834' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-4953443228854912595</id><published>2009-02-15T00:27:00.000-08:00</published><updated>2009-02-15T00:27:00.000-08:00</updated><title type='text'>So shouldn't they be called arrowads instead since...</title><content type='html'>So shouldn't they be called arrowads instead since they are no longer abstract monoids?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/4953443228854912595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/4953443228854912595'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2009/02/beyond-monads.html?showComment=1234686420000#c4953443228854912595' title=''/><author><name>Kefer</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2009/02/beyond-monads.html' ref='tag:blogger.com,1999:blog-11295132.post-5798722270156006834' source='http://www.blogger.com/feeds/11295132/posts/default/5798722270156006834' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-1475542622777272275</id><published>2009-02-15T00:13:00.001-08:00</published><updated>2009-02-15T00:13:00.001-08:00</updated><title type='text'>Here lies a dependently typed version: http://www....</title><content type='html'>Here lies a dependently typed version: http://www.cs.nott.ac.uk/~nad/repos/lib/Category/Monad/Indexed.agda</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/1475542622777272275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/1475542622777272275'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2009/02/beyond-monads.html?showComment=1234685580001#c1475542622777272275' title=''/><author><name>Jean-Philippe Bernardy</name><uri>http://www.blogger.com/profile/09574587903886283067</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2009/02/beyond-monads.html' ref='tag:blogger.com,1999:blog-11295132.post-5798722270156006834' source='http://www.blogger.com/feeds/11295132/posts/default/5798722270156006834' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-5849887923081243443</id><published>2009-02-15T00:11:00.000-08:00</published><updated>2009-02-15T00:11:00.000-08:00</updated><title type='text'>Here lies a dependently typed version: http://www....</title><content type='html'>Here lies a dependently typed version: http://www.cs.nott.ac.uk/~nad/repos/lib/Category/Monad/Indexed.agda</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/5849887923081243443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/5849887923081243443'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2009/02/beyond-monads.html?showComment=1234685460000#c5849887923081243443' title=''/><author><name>Jean-Philippe Bernardy</name><uri>http://www.blogger.com/profile/09574587903886283067</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2009/02/beyond-monads.html' ref='tag:blogger.com,1999:blog-11295132.post-5798722270156006834' source='http://www.blogger.com/feeds/11295132/posts/default/5798722270156006834' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11295132.post-7613777558450838007</id><published>2009-02-14T22:59:00.000-08:00</published><updated>2009-02-14T22:59:00.000-08:00</updated><title type='text'>Nice observation.   Certainly,  one major reason w...</title><content type='html'>Nice observation.   Certainly,  one major reason why parameterized monads are so attractive is exactly because of the easy upgrade path.    Anybody who is comfortable writing monadic code can get started very easily,  and allow the typechecker to do the heavy mental lifting for them.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/7613777558450838007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11295132/5798722270156006834/comments/default/7613777558450838007'/><link rel='alternate' type='text/html' href='http://blog.sigfpe.com/2009/02/beyond-monads.html?showComment=1234681140000#c7613777558450838007' title=''/><author><name>Leon Smith</name><uri>http://www.blogger.com/profile/06462854866941248768</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sigfpe.com/2009/02/beyond-monads.html' ref='tag:blogger.com,1999:blog-11295132.post-5798722270156006834' source='http://www.blogger.com/feeds/11295132/posts/default/5798722270156006834' type='text/html'/></entry></feed>