<?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: Haskell and Time</title>
	<atom:link href="http://therning.org/magnus/archives/389/feed" rel="self" type="application/rss+xml" />
	<link>http://therning.org/magnus/archives/389</link>
	<description>Incoherent mumblings</description>
	<lastBuildDate>Wed, 08 Aug 2012 00:21:01 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Magnus</title>
		<link>http://therning.org/magnus/archives/389/comment-page-1#comment-168608</link>
		<dc:creator>Magnus</dc:creator>
		<pubDate>Thu, 15 Jan 2009 22:52:35 +0000</pubDate>
		<guid isPermaLink="false">http://therning.org/magnus/?p=389#comment-168608</guid>
		<description><![CDATA[&lt;p&gt;@Mechanic, I think you&#039;ve got it the wrong way around.  One would use &lt;code&gt;fromInteger&lt;/code&gt; to convert an integer &lt;em&gt;to&lt;/em&gt; &lt;code&gt;POSIXTime&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In both your examples you are trying pass a &lt;code&gt;POSIXTime&lt;/code&gt; to &lt;code&gt;fromInteger&lt;/code&gt;, as expected you get type errors when you do that.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>@Mechanic, I think you&#8217;ve got it the wrong way around.  One would use <code>fromInteger</code> to convert an integer <em>to</em> <code>POSIXTime</code>.</p>

<p>In both your examples you are trying pass a <code>POSIXTime</code> to <code>fromInteger</code>, as expected you get type errors when you do that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mechanic</title>
		<link>http://therning.org/magnus/archives/389/comment-page-1#comment-168598</link>
		<dc:creator>Mechanic</dc:creator>
		<pubDate>Thu, 15 Jan 2009 18:27:44 +0000</pubDate>
		<guid isPermaLink="false">http://therning.org/magnus/?p=389#comment-168598</guid>
		<description><![CDATA[&lt;p&gt;I don&#039;t understand how to do this conversion, please, explain:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;fromInteger 43 :: POSIXTime
  43s&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;but&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;getPOSIXTime &gt;&gt;= (return .  fromInteger)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;:1:28:
    Couldn&#039;t match expected type &lt;code&gt;time-1.1.2.2:Data.Time.Clock.UTC.NominalDiffTime&#039;
           against inferred type&lt;/code&gt;Integer&#039;&lt;/p&gt;

&lt;p&gt;or another example&lt;/p&gt;

&lt;p&gt;Prelude Data.Time.Clock.POSIX&gt; a &lt;- getPOSIXTime
Prelude Data.Time.Clock.POSIX&gt; :type a
a :: POSIXTime
Prelude Data.Time.Clock.POSIX&gt; fromInteger a&lt;/p&gt;

&lt;p&gt;:1:12:
    Couldn&#039;t match expected type &lt;code&gt;Integer&#039;
           against inferred type&lt;/code&gt;POSIXTime&#039;&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>I don&#8217;t understand how to do this conversion, please, explain:</p>

<blockquote>
  <p>fromInteger 43 :: POSIXTime
  43s</p>
</blockquote>

<p>but</p>

<blockquote>
  <p>getPOSIXTime &gt;&gt;= (return .  fromInteger)</p>
</blockquote>

<p>:1:28:
    Couldn&#8217;t match expected type <code>time-1.1.2.2:Data.Time.Clock.UTC.NominalDiffTime'
           against inferred type</code>Integer&#8217;</p>

<p>or another example</p>

<p>Prelude Data.Time.Clock.POSIX&gt; a &lt;- getPOSIXTime
Prelude Data.Time.Clock.POSIX&gt; :type a
a :: POSIXTime
Prelude Data.Time.Clock.POSIX&gt; fromInteger a</p>

<p>:1:12:
    Couldn&#8217;t match expected type <code>Integer'
           against inferred type</code>POSIXTime&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Magnus</title>
		<link>http://therning.org/magnus/archives/389/comment-page-1#comment-148904</link>
		<dc:creator>Magnus</dc:creator>
		<pubDate>Wed, 17 Sep 2008 07:48:01 +0000</pubDate>
		<guid isPermaLink="false">http://therning.org/magnus/?p=389#comment-148904</guid>
		<description><![CDATA[&lt;p&gt;@Micha &amp; Andy: thanks for pointing that out.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>@Micha &amp; Andy: thanks for pointing that out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://therning.org/magnus/archives/389/comment-page-1#comment-148833</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Tue, 16 Sep 2008 23:57:01 +0000</pubDate>
		<guid isPermaLink="false">http://therning.org/magnus/?p=389#comment-148833</guid>
		<description><![CDATA[&lt;p&gt;&lt;code&gt;fromIntegral 1221603766 :: POSIXTime&lt;/code&gt; seems to work too, though it isn&#039;t much shorter.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p><code>fromIntegral 1221603766 :: POSIXTime</code> seems to work too, though it isn&#8217;t much shorter.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Micha? Bartoszkiewicz</title>
		<link>http://therning.org/magnus/archives/389/comment-page-1#comment-148832</link>
		<dc:creator>Micha? Bartoszkiewicz</dc:creator>
		<pubDate>Tue, 16 Sep 2008 23:52:37 +0000</pubDate>
		<guid isPermaLink="false">http://therning.org/magnus/?p=389#comment-148832</guid>
		<description><![CDATA[&lt;p&gt;You can use &lt;code&gt;fromInteger&lt;/code&gt; from the &lt;code&gt;Num&lt;/code&gt; class:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&gt; fromInteger 42 :: POSIXTime
42s
&lt;/code&gt;&lt;/pre&gt;
]]></description>
		<content:encoded><![CDATA[<p>You can use <code>fromInteger</code> from the <code>Num</code> class:</p>

<pre><code>&gt; fromInteger 42 :: POSIXTime
42s
</code></pre>
]]></content:encoded>
	</item>
</channel>
</rss>
