Re: [Haskell-cafe] Parsec to parse tree structures?

2010-03-17 Thread david fries
e are a lot of ways > to tackle it, but I think you need to elaborate a bit more on what is > needed. If you want to maintain the "object graph" structure, you'll > treat the problem quite a bit differently than if you are happy to > convert it to a pure data structure. &

Re: [Haskell-cafe] Parsec to parse tree structures?

2010-03-17 Thread david fries
Thanks for the links! I didn't realize that Iteratee can also do random access. I looked at Oleg's slides a while back, but I haven't wrapped my head around it. On Mon, 2010-03-15 at 08:57 -0500, John Lato wrote: > Hi Dave, > > > From: david fries > > >

Re: [Haskell-cafe] Parsec to parse tree structures?

2010-03-14 Thread david fries
Yep, That's what I had in mind. Thanks for the link. On Sun, 2010-03-14 at 19:09 +, Stephen Tetley wrote: > Hi David > > Ah ha - this form of binary file layout is quite common (e.g. PECOFF > object files and OpenType / TrueType fonts). > > Parsec and other parsing libraries are perhaps not

Re: [Haskell-cafe] Parsec to parse tree structures?

2010-03-14 Thread david fries
able starts at byte 200 of the file. So now I would jump to that position in the file and start parsing SubTable. After that I'd jump back and parse the remaining fields of the root table. On Sun, 2010-03-14 at 16:23 +, Stephen Tetley wrote: > On 14 March 2010 16:03, david fries wrot

[Haskell-cafe] Multiple versions of a cabal package Or what's the right way to update?

2010-03-14 Thread david fries
Dear Caféistas I desperately need your collective knowledge I have been working on porting the haskell-platform to the FreeBSD operating system for a while now and some versioning issues have come up. FreeBSD is still running on GHC-6.10.4 (6.12 is in the works). The ghc package contains a coupl

[Haskell-cafe] Parsec to parse tree structures?

2010-03-14 Thread david fries
Hello Café Some time ago I wrote a parser for a project of one our customers. The format was proprietary and binary. The data was structured as a tree with tables pointing to sub tables farther in the file. (Well actually there was one or two cases where branches joined together, so I guess it was

[Haskell-cafe] Newbie question about Parsec

2010-01-18 Thread david fries
Hey everybody I've been playing around with Parsec a little bit lately. I like it a lot, but now I've hit a bit of a challenge. Suppose I have to parse a variable length string representing a time interval. Depending on how many fields there are, the time is either interpreted as seconds, minutes

[Haskell-cafe] How does cabal determine version ranges in the dependencies?

2009-11-23 Thread David Fries
Hi everyone I recently started porting cabal-install to Freebsd. When I looked at its dependencies on hackage, I noticed HTTP (>=4000.0.2 && <4001). However the latest HTTP version on hackage is 4000.0.8. That struck me as kinda odd. How can cabal tell that it won't be compatible with HTTP vers