<?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/"
		>
<channel>
	<title>Comments on: Riddle me this</title>
	<atom:link href="http://www.serpentine.com/blog/2009/09/25/riddle-me-this/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.serpentine.com/blog/2009/09/25/riddle-me-this/</link>
	<description>Bryan O&#039;Sullivan&#039;s blog</description>
	<lastBuildDate>Fri, 03 Feb 2012 16:47:08 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Text.Printf and monad transformers &#171; Communicating Haskell Processes</title>
		<link>http://www.serpentine.com/blog/2009/09/25/riddle-me-this/comment-page-1/#comment-249192</link>
		<dc:creator>Text.Printf and monad transformers &#171; Communicating Haskell Processes</dc:creator>
		<pubDate>Fri, 06 Nov 2009 13:35:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.serpentine.com/blog/?p=454#comment-249192</guid>
		<description>[...] little while ago, Bryan O&#8217;Sullivan was developing his Criterion benchmark suite, and had trouble with using the Text.Printf module in a monad transformer on top of IO. I thought I knew how to solve this, but my first idea didn&#8217;t work &#8212; and nor did my [...]</description>
		<content:encoded><![CDATA[<p>[...] little while ago, Bryan O&#8217;Sullivan was developing his Criterion benchmark suite, and had trouble with using the Text.Printf module in a monad transformer on top of IO. I thought I knew how to solve this, but my first idea didn&#8217;t work &#8212; and nor did my [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saizan</title>
		<link>http://www.serpentine.com/blog/2009/09/25/riddle-me-this/comment-page-1/#comment-246604</link>
		<dc:creator>Saizan</dc:creator>
		<pubDate>Sat, 26 Sep 2009 16:46:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.serpentine.com/blog/?p=454#comment-246604</guid>
		<description>well, the typeclass system is what&#039;s doing most of the work :P</description>
		<content:encoded><![CDATA[<p>well, the typeclass system is what&#8217;s doing most of the work <img src='http://www.serpentine.com/wordpress/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bryan O'Sullivan</title>
		<link>http://www.serpentine.com/blog/2009/09/25/riddle-me-this/comment-page-1/#comment-246603</link>
		<dc:creator>Bryan O'Sullivan</dc:creator>
		<pubDate>Sat, 26 Sep 2009 16:40:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.serpentine.com/blog/?p=454#comment-246603</guid>
		<description>Saizan: Wow, that&#039;s impressive. Type signatures longer than the code they describe? Eeek!</description>
		<content:encoded><![CDATA[<p>Saizan: Wow, that&#8217;s impressive. Type signatures longer than the code they describe? Eeek!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saizan</title>
		<link>http://www.serpentine.com/blog/2009/09/25/riddle-me-this/comment-page-1/#comment-246568</link>
		<dc:creator>Saizan</dc:creator>
		<pubDate>Sat, 26 Sep 2009 04:38:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.serpentine.com/blog/?p=454#comment-246568</guid>
		<description>I got a solution requiring more extensions but that it looks more general, here&#039;s the paste:
http://hpaste.org/fastcgi/hpaste.fcgi/view?id=9857

The types, especially those inferred like in test, aren&#039;t so pretty but not horrible either.</description>
		<content:encoded><![CDATA[<p>I got a solution requiring more extensions but that it looks more general, here&#8217;s the paste:<br />
<a href="http://hpaste.org/fastcgi/hpaste.fcgi/view?id=9857" rel="nofollow">http://hpaste.org/fastcgi/hpaste.fcgi/view?id=9857</a></p>
<p>The types, especially those inferred like in test, aren&#8217;t so pretty but not horrible either.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brian</title>
		<link>http://www.serpentine.com/blog/2009/09/25/riddle-me-this/comment-page-1/#comment-246567</link>
		<dc:creator>brian</dc:creator>
		<pubDate>Sat, 26 Sep 2009 04:09:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.serpentine.com/blog/?p=454#comment-246567</guid>
		<description>Don&#039;t forget package &#039;xformat&#039;.</description>
		<content:encoded><![CDATA[<p>Don&#8217;t forget package &#8216;xformat&#8217;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sclv</title>
		<link>http://www.serpentine.com/blog/2009/09/25/riddle-me-this/comment-page-1/#comment-246546</link>
		<dc:creator>sclv</dc:creator>
		<pubDate>Fri, 25 Sep 2009 19:51:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.serpentine.com/blog/?p=454#comment-246546</guid>
		<description>this is a terrible hack, but no more of a hack than printf itself:

test :: (HPrintfType r, NoOp r) =&gt; Bool -&gt; Handle -&gt; String -&gt; r
test b = if b then hPrintf
              else nopr

class NoOp a where
    nopr :: a

instance NoOp (IO a) where
    nopr = return undefined

instance (NoOp r) =&gt; NoOp (a -&gt; r) where
    nopr = const $ nopr

don&#039;t have an answer for the second bit at the moment tho.</description>
		<content:encoded><![CDATA[<p>this is a terrible hack, but no more of a hack than printf itself:</p>
<p>test :: (HPrintfType r, NoOp r) =&gt; Bool -&gt; Handle -&gt; String -&gt; r<br />
test b = if b then hPrintf<br />
              else nopr</p>
<p>class NoOp a where<br />
    nopr :: a</p>
<p>instance NoOp (IO a) where<br />
    nopr = return undefined</p>
<p>instance (NoOp r) =&gt; NoOp (a -&gt; r) where<br />
    nopr = const $ nopr</p>
<p>don&#8217;t have an answer for the second bit at the moment tho.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

