Hi Tom, On Feb 3, 2004, at 1:40 PM, Tomasz Zielonka wrote:
Hi!
On Tue, Feb 03, 2004 at 01:19:16PM -0500, Gregory Wright wrote:
I'm starting from Tomasz's code but will add bit fields. I'll also have to add handling for mutable arrays.
Tomasz's code uses parsec, which I'd never bothered to learn parsec so I spent part of the weekend doing the examples in the user guide.
If I remember correctly, you were dealing with unboxed arrays. In my package there are two low-lever BinaryParsers - one that uses Parsec, and one that parses from (UArray Int Word8)s. They are independent from each other, so you can ignore the former.
Yes, my immediate application is for unboxed arrays, but if I'm going to learn the TH infrastructure, I might as well try to build a library that can be extended to support different kinds of arrays.
BTW, Parsec is a really good and useful library, something you should learn anyway.
I once wrote a compiler for a little language that controlled some network hardware, so I have a soft spot for parsing ;-)
Tomasz's deserialization package is a good starting point, and I hope to have something soon.
When that happens, I would love to see the results. Unfortunatelly I don't have the time and energy to work on this library now. I'll try to find time to extract and release the encoding part of my little framework.
BTW, I have a patch that will build DecodeTH.hs under 6.2, using the new TH syntax. It's quite simple and no doubt you could do it yourself in a few minutes, but I can send it to you if you'd like.
Best regards, Tom
--
Best Wishes, Greg