[Haskell-cafe] Continuable and serializable parsers.

Antoine Latter aslatter at gmail.com
Fri Dec 25 17:12:22 EST 2009


On Fri, Dec 25, 2009 at 5:06 PM, Serguey Zefirov <sergueyz at gmail.com> wrote:
>>> 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.
>>
>> 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.
>
> Higher-order like "data A m a = A (m a)"?
>

In that case, You'll be able to serialize that as long as you can
serialize (m a).

I meant higher-order as in function-types. So you wouldn't be able to serialize:

string :: String -> Parser String

Unless you had some way to reify the particular function to data.

I'm also hazy on how you could encode a fully monadic expression - n
applicative style parser may be a bit more modest.

Antoine


More information about the Haskell-Cafe mailing list