On Sun, Dec 27, 2009 at 09:34:54AM -0500, Edward Kmett wrote:
> On Sun, Dec 27, 2009 at 8:59 AM, Felipe Lessa wrote:
> > Is my example contrived? Am I missing something? :)
>
> Assuming a sufficiently smart preprocessor you can do anything you'd like,
> but the result isn't an arrow. ;)
Hehe, I s
On Sun, Dec 27, 2009 at 8:59 AM, Felipe Lessa wrote:
>
> Hmmm... but, assuming a preprocessor, you probably would be able
> to transform this code:
> [snip]
> The only part missing here is being able to run only a small part
> of the arrow's computation and then return another Action.
>
>
On Sun, Dec 27, 2009 at 08:20:53AM -0500, Edward Kmett wrote:
> On Fri, Dec 25, 2009 at 8:31 PM, Felipe Lessa wrote:
> > However you're right in a sense, you can't use this scheme to
> > serialize any functions taking functions, like
> >
> >something :: (a -> Parser a) -> a -> Parser a
> >
> >
On Fri, Dec 25, 2009 at 8:31 PM, Felipe Lessa wrote:
>
> However you're right in a sense, you can't use this scheme to
> serialize any functions taking functions, like
>
>something :: (a -> Parser a) -> a -> Parser a
>
> because
>
>data MyParser = FunSomething (a -> MyParser) a
>
> wouldn'
On Fri, Dec 25, 2009 at 11:56 AM, Serguey Zefirov wrote:
> A pair of problems:
> 1) How to write a parser that could be restarted? Like, it will be
> represented by a function that returns something along the lines
>
> data ParseStepResult input result =
>Success (Maybe (input -> ParseStepResu
On Fri, Dec 25, 2009 at 05:12:22PM -0500, Antoine Latter wrote:
> 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 som
On Fri, Dec 25, 2009 at 5:06 PM, Serguey Zefirov 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 lo
>> 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 happ
2009/12/25 Felipe Lessa :
>> 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 transformati
On Fri, Dec 25, 2009 at 4:55 PM, Felipe Lessa 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 construc
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 module
2009/12/25 Valery V. Vorotyntsev :
>> 1) How to write a parser that could be restarted? Like, it will be
>> represented by a function that returns something along the lines
>>
>> data ParseStepResult input result =
>> Success (Maybe (input -> ParseStepResult input result)) (Maybe result)
>> | F
Serguey Zefirov wrote:
>
> 1) How to write a parser that could be restarted? Like, it will be
> represented by a function that returns something along the lines
>
> data ParseStepResult input result =
>Success (Maybe (input -> ParseStepResult input result)) (Maybe result)
> | Failure
>
> (ie,
A pair of problems:
1) How to write a parser that could be restarted? Like, it will be
represented by a function that returns something along the lines
data ParseStepResult input result =
Success (Maybe (input -> ParseStepResult input result)) (Maybe result)
| Failure
(ie, parsers using str
14 matches
Mail list logo