On 15.09 21:53, Bulat Ziganshin wrote:
> EK> data Packet = Packet Word32 Word32 Word32 [FastString]
>
> well. you can see my own BinaryStream package at http://freearc.narod.ru
>
> class BinaryData a where
> read :: ...
> write :: ...
I don't think this is a very good solution. Keeping the o
Hello Einar,
Tuesday, September 13, 2005, 7:03:00 PM, you wrote:
EK> data Packet = Packet Word32 Word32 Word32 [FastString]
well. you can see my own BinaryStream package at http://freearc.narod.ru
class BinaryData a where
read :: ...
write :: ...
instance BinaryData Word32 where
read = .
On 13.09 23:31, Tomasz Zielonka wrote:
> How about all these points together?:
>
> a) Simple monadic interface
I think I already have this - minus packaging and documentation.
> b) Using better combinators
This is lacking.
> c) Using TH to generate code for the simple cases
I have TH for gene
On Tue, Sep 13, 2005 at 06:03:00PM +0300, Einar Karttunen wrote:
> We will use the following Haskell datatype:
>
> data Packet = Packet Word32 Word32 Word32 [FastString]
>
> 1) Simple monadic interface
>
> [...]
>
> This works but writing the code gets tedious and dull.
>
> 2) Using better combi
Einar Karttunen writes:
> I am trying to figure out the best interface to binary parser
> and pretty printing combinators for network protocols.
>
> 2) Using better combinators
>
> packet = w32be <> w32be <> w32be <> lengthPrefixList w32be (lengthPrefixList
> w32be bytes)
> Has anyone used co
Hello
I am trying to figure out the best interface to binary parser
and pretty printing combinators for network protocols.
I am trying to find the most natural syntax to express
these parsers in Haskell and would like opinions and
new ideas.
As an example I will use a protocol with the followin