<div dir="ltr">I am curious to understand the logic, the &quot;Haskell Think&quot;, here.&nbsp; Why is it that the byteString only supports conversion to int.<br><br>daryoush <br><div class="gmail_quote">On Sun, Aug 24, 2008 at 2:23 PM, Don Stewart <span dir="ltr">&lt;<a href="mailto:dons@galois.com">dons@galois.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">dmehrtash:<br>
<div class="Ih2E3d">&gt; &nbsp; &nbsp;I am trying to convert a string to a float. &nbsp;It seems that Data.ByteString<br>
&gt; &nbsp; &nbsp;library only supports readInt. &nbsp; &nbsp;After some googling I came accross a<br>
</div>&gt; &nbsp; &nbsp;possibloe implementation: [1]<a href="http://sequence.svcs.cs.pdx.edu/node/373" target="_blank">http://sequence.svcs.cs.pdx.edu/node/373</a><br>
&gt;<br>
<br>
Use the bytstring-lexing library,<br>
<br>
 &nbsp; &nbsp;<a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/bytestring-lexing" target="_blank">http://hackage.haskell.org/cgi-bin/hackage-scripts/package/bytestring-lexing</a><br>
<br>
Which provides a copying and non-copying lexer for doubles,<br>
<br>
 &nbsp; &nbsp;readDouble &nbsp; &nbsp; &nbsp; :: ByteString -&gt; Maybe (Double, ByteString)<br>
 &nbsp; &nbsp;unsafeReadDouble :: ByteString -&gt; Maybe (Double, ByteString)<br>
<font color="#888888"><br>
-- Don<br>
</font></blockquote></div><br><br clear="all"><br>
</div>