Announcing Haskell protocol-buffers 1.4.0 (the smashing recursive edition)

2009-01-09 Thread Chris
Hello, What is Haskell protocol-buffers? This provides a program 'hprotoc' which compiles a ".proto" file defining messages to Haskell modules, and the protocol-buffers API to access them and convert back and forth to the binary wire protocol, and protocol-buffers-descriptors which are m

Re: The way to set value to extension in Protocol buffers

2009-01-09 Thread Kenton Varda
On Fri, Jan 9, 2009 at 12:19 AM, Alek Storm wrote: > Kenton, do all composite fields in extensions have > to be optional? If so, can we document this? Extensions must be optional or repeated, since a required extension doesn't make sense. I'm pretty sure the compiler checks this. If not, tha

Re: The way to set value to extension in Protocol buffers

2009-01-09 Thread Kenton Varda
To give the same answer as Alek with slightly different wording: The accessors for extensions are analogous to the accessors for a normal field. For a normal message-type field, there is no "set" accessor. There is only "mutable". For example: // Proto message Foo { optional Bar bar =

Re: The way to set value to extension in Protocol buffers

2009-01-09 Thread Alek Storm
On Jan 9, 1:32 am, chongyc wrote: > I defined proto by following . > > message Ch { >   required int32        offset = 1; > > } > > message Foo { >   required string cmd = 1; > >   extensions 1000 to max; > > } > > message Bar { >   extend Foo { >     required Ch ck = 1000; >   } > > } > > Then I