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.

Antoine
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to