[Haskell-cafe] ANN: A triple of new packages for talking to the outside world

Adam Langley agl at imperialviolet.org
Sun Jan 6 18:54:02 EST 2008


Over the Xmas break I made some headway on writing an RPC package
since many of the ideas that I want to play with involve such a thing
as a basic building block. However, some might find some of the
spin-off packages that I wrote along the way useful.

* binary-strict:

This is mostly a cut-n-paste job from the excellent binary package
which provides Data.Binary.Strict.Get - a monad which is a drop in
replacement for Get, but which parses strict ByteStrings and returns
an Either, thus one can parse binary data without triggering an
exception on failure.

* codec-libevent:

This parses the "tagging" IDL files introduced in libevent[1]
1.4.0-beta and later and can generate the Haskell code for them. These
are platform-independent "structs" (in the C sense) and libevent
provides the complementary C infrastructure for them. You should be
able to understand almost everything these is to know about them from
a quick example:

struct msg {
        string from_name = 1;
        string to_name = 2;
        optional struct[kill] attack = 3;
        array struct[run] run = 4;
}

[1] http://monkey.org/~provos/libevent/

* control-timeout:

This module provides simple timeouts - e.g. actions which occur after
a given number of seconds and which can be canceled. It does it in a
not-totally-stupid fashion so that you don't need to worry about
setting hundreds of them.


AGL

-- 
Adam Langley                                      agl at imperialviolet.org
http://www.imperialviolet.org                       650-283-9641


More information about the Haskell-Cafe mailing list