<div dir="ltr">Sorry for answering my own question : <div><br></div><div>end &lt;- try (float haskelldef)<div>&lt;|&gt; (fmap fromInteger $ integer haskelldef )</div></div><div><br></div><div style>appears to work nicelly. Sorry about that.</div>
<div style><br></div><div style>/Fredrik</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jul 7, 2013 at 1:57 PM, Fredrik Karlsson <span dir="ltr">&lt;<a href="mailto:dargosch@gmail.com" target="_blank">dargosch@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear list,<div><br></div><div>Sorry for asking you another parsec question. I have  a text file that is the output of a C/C++ program, involving time references in double format. Now, the program seems to truncate the output if possible, so a file that is one second long will produce this file:</div>

<div><br></div><div><div>File type = &quot;ooTextFile&quot;</div><div>Object class = &quot;TextGrid&quot;</div><div><br></div><div>xmin = 0 </div><div>xmax = 1 </div><div>....</div><div><br></div><div>and a file that is 1.1 seconds long will be this:</div>

<div><br></div><div><div>File type = &quot;ooTextFile&quot;</div><div>Object class = &quot;TextGrid&quot;</div><div><br></div><div>xmin = 0 </div><div>xmax = 1.1</div><div>...</div><div><br></div><div>Now, how do I handle this case in parsec?</div>

<div><br></div><div>I have tried this:</div><div><br></div><div><div>start &lt;- try (float haskellDef) </div><div><span style="white-space:pre-wrap">        </span>&lt;|&gt;  fmap ( / 1.0 ) $ integer haskelldef</div>
<div><br></div><div>and similar solutions, but I cant get it to accept the 0.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>/Fredrik</div></font></span></div></div></div><span class="HOEnZb"><font color="#888888"><div>
<div><br></div>-- <br>&quot;Life is like a trumpet - if you don&#39;t put anything into it, you don&#39;t get anything out of it.&quot;
</div></font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>&quot;Life is like a trumpet - if you don&#39;t put anything into it, you don&#39;t get anything out of it.&quot;
</div>