Magnus Therning | 9 Jul 08:10 2014

Turning a message parser into a protocol handler

The last few days I've been playing around with the combination of
attoparsec/blaze/conduit to build a parser and a generator of messages
in a small proprietary protocol used at work.  The goal is to easily
build small clients of the protocol, and possibly, if time permits,
build a server in Haskell which mimics the C implementation of the

I've come so far that the message parsing and generating is working.
I've also put together a couple of tiny clients to verify that my
Haskell code can communicate with the production implementation of
the server.  I've done this by manually tying the toy example
behaviour into my conduit process.  However, I recognise that as the
required behaviour becomes more and more complex my thinking about the
behaviour more and more resembles a finite automaton (or FSM).

This led me to look around for an FSM generator tool or library for
Haskell, but found none.  Did I miss something in my search?

Or maybe Haskell already IS the FSM generator tool I need.



Magnus Therning                      OpenPGP: 0xAB4DFBA4 
email: magnus <at>   jabber: magnus <at>
twitter: magthe     

I invented the term Object-Oriented, and I can tell you I did not have
C++ in mind.
     -- Alan Kay
(Continue reading)