[Haskell-cafe] Continuable and serializable parsers.

Antoine Latter aslatter at gmail.com
Fri Dec 25 17:03:55 EST 2009


On Fri, Dec 25, 2009 at 4:55 PM, Felipe Lessa <felipe.lessa at gmail.com> wrote:
> On Fri, Dec 25, 2009 at 11:25:41PM +0200, Serguey Zefirov wrote:
>> I am looking more for the way to serialize intermediate parser
>> computations. The first problem is, actually, easy one. ;)
>
> Probably you'll have to create a data constructor for each step
> of your parser.
>
> AFAIK, one of HAppS modules does a similar transformation via
> Template Haskell.  The functions specify transactions, and each
> transaction is converted to a serializable data type.  Then it's
> possible to create a transaction log by serializing them before
> their execution.
>
> Of course you could also modify Happy instead of writing a TH
> transformation.  Both are preprocessor.  TH would be more
> convenient, though.
>

The happstack transaction serialization doesn't support higher-order
types. Whether or not that's too much of a restriction depends on what
you want your parsers to look like.

Antoine


More information about the Haskell-Cafe mailing list