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 messages which describe ".proto" 
files and allow for runtime reflection of annotated message definitions.

  The big addition to this version (which is 1.4.0) over the previous 
version (which was 1.2.0) is for when modules are in a dependency loop.  
The most common reason this happens is whenever a message is extended in 
the same proto file but outside of the message itself (e.g. at the top 
level).  This was salved in previous versions by telling the user to 
create boilerplate header files (a .hs-boot file) and add a few {-# 
SOURCE #-} pragmas.  This was primitive, and could not cover all the 
corner cases.

  Those days are gone.

  The new version of hprotoc uses the cutting edge version of 
haskell-src-exts (4.8.0) to generate not only the Haskell modules but 
also the hs-boot files and {-# SOURCE #-} pragmas!  This is truly a 
glorious way to start the New Year.

  But wait, there is more!  If a more than two messages define 
extensions of each other in a strongly connected dependency graph then 
the hs-boot files are not enough.  For these strange cases hprotoc will 
now generate modules ending with 'Key.hs that separately define the 
extensions.  You do not need to lift a finger, you never need to import 
these modules yourself, this all exists behind the scenes.  Also, 
hprotoc goes way out its way to reduce the number of .hs-boot and 
'Key.hs files, and it uses only a minimal set of {-# SOURCE #-} 
pragmas.  It is so painless that if I did not put this into this 
announcement you might not even know.

  Now all generated should compile with no changes or additions.
  Of course, hprotoc still generates nothing for services and methods.

Where to get the new shiny packages? hackage:

http://hackage.haskell.org/cgi-bin/hackage-scripts/package/protocol-buffers

http://hackage.haskell.org/cgi-bin/hackage-scripts/package/protocol-buffers-descriptor

http://hackage.haskell.org/cgi-bin/hackage-scripts/package/hprotoc

And you will need haskell-src-exts, version 0.4.8, by Niklas Broberg:

http://hackage.haskell.org/cgi-bin/hackage-scripts/package/haskell-src-exts-0.4.8

(past version do not work and future versions will probably change 
enough to break compilation of hprotoc)

Happy New Year,
  Chris Kuklewicz


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to