<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Writer Monads via Continuations</title>
	<atom:link href="http://blog.melding-monads.com/2010/03/14/writer-monads-via-continuations/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.melding-monads.com/2010/03/14/writer-monads-via-continuations/</link>
	<description>Math, Computer Science,  and Education</description>
	<lastBuildDate>Wed, 08 May 2013 14:59:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: lpsmith</title>
		<link>http://blog.melding-monads.com/2010/03/14/writer-monads-via-continuations/#comment-70</link>
		<dc:creator><![CDATA[lpsmith]]></dc:creator>
		<pubDate>Tue, 16 Mar 2010 01:00:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.melding-monads.com/?p=211#comment-70</guid>
		<description><![CDATA[Also,  I should say that the continuation-based writer monad is one of the key aspects of all the various corecursive queue monads in my paper.   If you are comfortable with this post,  then it should be a little bit easier to understand the construction in my paper.

To clarify,  the continuation-based writer is used internally as part of the corecursive queue transformer,  but it cannot be used as an &lt;i&gt;argument&lt;/i&gt; to the transformer.]]></description>
		<content:encoded><![CDATA[<p>Also,  I should say that the continuation-based writer monad is one of the key aspects of all the various corecursive queue monads in my paper.   If you are comfortable with this post,  then it should be a little bit easier to understand the construction in my paper.</p>
<p>To clarify,  the continuation-based writer is used internally as part of the corecursive queue transformer,  but it cannot be used as an <i>argument</i> to the transformer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lpsmith</title>
		<link>http://blog.melding-monads.com/2010/03/14/writer-monads-via-continuations/#comment-69</link>
		<dc:creator><![CDATA[lpsmith]]></dc:creator>
		<pubDate>Tue, 16 Mar 2010 00:44:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.melding-monads.com/?p=211#comment-69</guid>
		<description><![CDATA[Yes.  The continuation monad lacks an &lt;code&gt;MonadFix&lt;/code&gt; instance,  which is why you can&#039;t use it with the corecursive queue transformer.  ;-)   Additionally, you can&#039;t use it with the examples in &lt;a href=&quot;http://blog.melding-monads.com/2009/12/30/fun-with-the-lazy-state-monad/&quot; rel=&quot;nofollow&quot;&gt;Fun with the Lazy State Monad&lt;/a&gt; for a different reason:  the continuation monad &lt;a href=&quot;http://blog.melding-monads.com/2009/12/20/are-continuations-really-the-mother-of-all-monads/&quot; rel=&quot;nofollow&quot;&gt;transmutes the lazy state monad into a strict state monad&lt;/a&gt;.

It is believed to be impossible to define &lt;code&gt;MonadFix&lt;/code&gt; on the standard continuation monad,  but as far as I am aware,  this is not definitively known.    Levent Erkök wrote about this conjecture in his Ph.D. thesis &lt;a href=&quot;http://sites.google.com/site/leventerkok/erkok-thesis.pdf?attredirects=0&quot; rel=&quot;nofollow&quot;&gt;Value Recursion in Monadic Computations&lt;/a&gt;, where he proves a theorem that seems to support the conjecture.  

However, we now know that the statement of Erkök&#039;s conjecture needs to be made more precise.  For example, the codensity monad is a continuation monad that uses higher-ranked types to hide the type of the result.   It appears in Edward Kmett&#039;s &lt;a href=&quot;http://hackage.haskell.org/package/category-extras&quot; rel=&quot;nofollow&quot;&gt;category-extras&lt;/a&gt; and Mauro Jaskelioff&#039;s &lt;a href=&quot;http://www.fceia.unr.edu.ar/~mauro/monatron/&quot; rel=&quot;nofollow&quot;&gt;Monatron&lt;/a&gt; library,  and is the key to Janis Voigtländer&#039;s paper.  Interestingly,  the codensity monad admits an instance for &lt;code&gt;MonadFix&lt;/code&gt;,  as demonstrated by Monatron but not category-extras.    However, the codensity&#039;s &lt;code&gt;MonadFix&lt;/code&gt; does not appear to be well-behaved,  as I don&#039;t know of any interesting examples where it converges.

Also,  I&#039;ve heard Erkök&#039;s conjecture informally stated as &quot;there are no useful fixpoint operators on continuations&quot;,  which my paper &quot;&lt;a href=&quot;http://themonadreader.wordpress.com/2009/07/29/issue-14/&quot; rel=&quot;nofollow&quot;&gt;Lloyd Allison&#039;s Corecursive Queues&lt;/a&gt;&quot; throughly refutes.    Not only did I demonstrate a fixpoint operator on the continuation monad,  I also demonstrate a practical application where it&#039;s use seems to be required!

If you are really interested in the studying the relationship of &lt;code&gt;MonadFix&lt;/code&gt;,  the continuation monad,  and other continuation-like monads,  you should probably take a look at &quot;&lt;a href=&quot;http://www.cs.indiana.edu/cgi-bin/techreports/TRNNN.cgi?trnum=TR546&quot; rel=&quot;nofollow&quot;&gt;Recursion is a Computational Effect&lt;/a&gt;&quot; by Dan Friedman and Amr Sabry.  I don&#039;t understand all the details,  but they implement &lt;code&gt;mfix&lt;/code&gt; on the continuation monad using &lt;code&gt;unsafePerformIO&lt;/code&gt;,  and use it to  implement &quot;&lt;a href=&quot;http://groups.google.com/group/comp.lang.scheme/msg/063a514aa6933180&quot; rel=&quot;nofollow&quot;&gt;LETREC + CALL/CC = SET!&lt;/a&gt;&quot; in Haskell.

It seems likely that there is something here yet to be discovered.  At the very least,  there are explanations to be made and things to be definitively confirmed or refuted.]]></description>
		<content:encoded><![CDATA[<p>Yes.  The continuation monad lacks an <code>MonadFix</code> instance,  which is why you can&#8217;t use it with the corecursive queue transformer.  ;-)   Additionally, you can&#8217;t use it with the examples in <a href="http://blog.melding-monads.com/2009/12/30/fun-with-the-lazy-state-monad/" rel="nofollow">Fun with the Lazy State Monad</a> for a different reason:  the continuation monad <a href="http://blog.melding-monads.com/2009/12/20/are-continuations-really-the-mother-of-all-monads/" rel="nofollow">transmutes the lazy state monad into a strict state monad</a>.</p>
<p>It is believed to be impossible to define <code>MonadFix</code> on the standard continuation monad,  but as far as I am aware,  this is not definitively known.    Levent Erkök wrote about this conjecture in his Ph.D. thesis <a href="http://sites.google.com/site/leventerkok/erkok-thesis.pdf?attredirects=0" rel="nofollow">Value Recursion in Monadic Computations</a>, where he proves a theorem that seems to support the conjecture.  </p>
<p>However, we now know that the statement of Erkök&#8217;s conjecture needs to be made more precise.  For example, the codensity monad is a continuation monad that uses higher-ranked types to hide the type of the result.   It appears in Edward Kmett&#8217;s <a href="http://hackage.haskell.org/package/category-extras" rel="nofollow">category-extras</a> and Mauro Jaskelioff&#8217;s <a href="http://www.fceia.unr.edu.ar/~mauro/monatron/" rel="nofollow">Monatron</a> library,  and is the key to Janis Voigtländer&#8217;s paper.  Interestingly,  the codensity monad admits an instance for <code>MonadFix</code>,  as demonstrated by Monatron but not category-extras.    However, the codensity&#8217;s <code>MonadFix</code> does not appear to be well-behaved,  as I don&#8217;t know of any interesting examples where it converges.</p>
<p>Also,  I&#8217;ve heard Erkök&#8217;s conjecture informally stated as &#8220;there are no useful fixpoint operators on continuations&#8221;,  which my paper &#8220;<a href="http://themonadreader.wordpress.com/2009/07/29/issue-14/" rel="nofollow">Lloyd Allison&#8217;s Corecursive Queues</a>&#8221; throughly refutes.    Not only did I demonstrate a fixpoint operator on the continuation monad,  I also demonstrate a practical application where it&#8217;s use seems to be required!</p>
<p>If you are really interested in the studying the relationship of <code>MonadFix</code>,  the continuation monad,  and other continuation-like monads,  you should probably take a look at &#8220;<a href="http://www.cs.indiana.edu/cgi-bin/techreports/TRNNN.cgi?trnum=TR546" rel="nofollow">Recursion is a Computational Effect</a>&#8221; by Dan Friedman and Amr Sabry.  I don&#8217;t understand all the details,  but they implement <code>mfix</code> on the continuation monad using <code>unsafePerformIO</code>,  and use it to  implement &#8220;<a href="http://groups.google.com/group/comp.lang.scheme/msg/063a514aa6933180" rel="nofollow">LETREC + CALL/CC = SET!</a>&#8221; in Haskell.</p>
<p>It seems likely that there is something here yet to be discovered.  At the very least,  there are explanations to be made and things to be definitively confirmed or refuted.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Job</title>
		<link>http://blog.melding-monads.com/2010/03/14/writer-monads-via-continuations/#comment-68</link>
		<dc:creator><![CDATA[Job]]></dc:creator>
		<pubDate>Mon, 15 Mar 2010 12:36:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.melding-monads.com/?p=211#comment-68</guid>
		<description><![CDATA[Another disadvantage of continuation-based monads is that you can&#039;t make them instances of MonadFix :(]]></description>
		<content:encoded><![CDATA[<p>Another disadvantage of continuation-based monads is that you can&#8217;t make them instances of MonadFix :(</p>
]]></content:encoded>
	</item>
</channel>
</rss>
