[email protected]
[Top] [All Lists]

Re: [Haskell-cafe] Continuable and serializable parsers.

Subject: Re: [Haskell-cafe] Continuable and serializable parsers.
From: Antoine Latter
Date: Fri, 25 Dec 2009 17:12:22 -0500
On Fri, Dec 25, 2009 at 5:06 PM, Serguey Zefirov <[email protected]> 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.

Haskell-Cafe mailing list
[email protected]

<Prev in Thread] Current Thread [Next in Thread>