<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Jun 20, 2015 at 9:29 PM, Barry DeZonia <span dir="ltr"><<a href="mailto:bdezonia@gmail.com" target="_blank">bdezonia@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>I need to write some code that will read binary data from a file into various types defined in Data.Int, Data.Word, and the floating types. I am looking to make functions with signatures like Handle->IO Word16 and Handle->IO Int32 and Handle->IO Float and others similarly defined. One complication I am running into is that the data is stored in big endian byte </div></div></blockquote><div><br></div><div>Hopefully you don't have some requirement to reinvent this wheel; the binary package already provides it, including support for endianness.</div><div><br></div><div><a href="http://hackage.haskell.org/package/binary">http://hackage.haskell.org/package/binary</a><br></div><div><br></div></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>brandon s allbery kf8nh                               sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>                                  <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div><div>unix, openafs, kerberos, infrastructure, xmonad        <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div></div>
</div></div>