it really was an indentation error<br>i configured my editor to expand tabs into spaces but somehow he did a real tab on line 9 and 10<br>thank you<br><br><div class="gmail_quote">2009/6/16 Daniel Fischer <span dir="ltr">&lt;<a href="mailto:daniel.is.fischer@web.de">daniel.is.fischer@web.de</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Am Dienstag 16 Juni 2009 22:35:17 schrieb Nico Rolle:<br>
<div class="im">&gt; Hi<br>
&gt;<br>
&gt; Heres my code snippet.<br>
&gt; It reports that my error is in line 9 right after the main definition.<br>
&gt; All functions that i call work under normal circumstances.<br>
&gt; Thanks<br>
<br>
</div>Must be the indentation, probably the xs is indented further than the following line<br>
(though that&#39;s not the case for the code copy-pasted from the mail to an editor).<br>
<br>
But note that this will most likely print out 0 twice.<br>
The let pnp = ... bindings don&#39;t cause any computation to occur.<br>
To measure the time the computations take, you must force them to occur between the two<br>
calls to getCurrentTime.<br>
<div class="im"><br>
&gt;<br>
&gt;<br>
&gt; module Benchmark<br>
&gt;     where<br>
&gt;<br>
&gt; import ReadCSV<br>
&gt; import Operators<br>
&gt; import Data.Time.Clock (diffUTCTime, getCurrentTime)<br>
&gt;<br>
&gt; main = do<br>
&gt;     xs &lt;- readCSV &quot;dataconvert/lineitem.tbl&quot; &#39;|&#39;<br>
&gt;     start &lt;- getCurrentTime<br>
&gt;     let pnp = projection [5] xs<br>
&gt;     let snp = selection (\x -&gt; (x!!0) &gt; (Int 17000)) pnp<br>
&gt;     end &lt;- getCurrentTime<br>
&gt;     putStrLn $ show (end `diffUTCTime` start)<br>
&gt;     start2 &lt;- getCurrentTime<br>
&gt;     let pp = pProjection [5] xs<br>
&gt;     let sp = pSelection (\x -&gt; (x!!0) &gt; (Int 17000)) pp<br>
&gt;     end2 &lt;- getCurrentTime<br>
&gt;     putStrLn $ show (end2 `diffUTCTime` start2)<br>
&gt;     return xs<br>
<br>
</div>_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
</blockquote></div><br>