This thread asks the same question and the answer may buried in there:
http://www.haskell.org/pipermail/haskell/2006-March/thread.html#17665
I believe something of the code has been absorbed into something more recent...
Jared.
On 8/29/06, mvanier <[EMAIL PROTECTED]> wrote:
Does anyone kno
Hello,
I have a graph of function applications which I would like to 'compile' into
an Arrow, specifically the SF Arrow from Yampa.
I'd appreciate any advice on how I might go about this.
The graphs, of which there will be many, will be constructed at runtime and
will be executed for extended
Does anyone know where I could find the source code for the Haskell web server
described in the papers "Tackling the Awkward Squad" by SPJ and "Writing
High-Performance Server Applications in Haskell, Case Study: A Haskell Web
Server" by Simon Marlow?
Thanks in advance,
Mike
Udo Stenzel wrote:
Chris Kuklewicz wrote:
Again, Parsec requires you to put "try" where you need it
I'm pretty sure it does, although this
Udo Stenzel wrote:
countBetween 0 n p = p <:> countBetween 0 (n-1) p <|> return []
is a place where it's not needed in general.
No, see my exam
Chris Kuklewicz wrote:
> Again, Parsec requires you to put "try" where you need it
I'm pretty sure it does, although this
> Udo Stenzel wrote:
> >countBetween 0 n p = p <:> countBetween 0 (n-1) p <|> return []
is a place where it's not needed in general. You should know what
you're doing, t
Il Tue, Aug 29, 2006 at 10:02:38AM +0100, Brian Hulley ebbe a scrivere:
> Yes I agree the StateT/monad transformer approach is probably best in the
> long run, since by using the standard monad transformers, you will get code
> that will scale better to handle more complexities later, and has the
Udo Stenzel wrote:
Stephane Bortzmeyer wrote:
Parsec provides "count n p" to run the parser p exactly n times. I'm
looking for a combinator "countBetween m n p" which will run the
parser between m and n times. It does not exist in Parsec.
infixr 2 <:>
(<:>) = ap . ap (return (:))
Again, Par
Stephane Bortzmeyer wrote:
> Parsec provides "count n p" to run the parser p exactly n times. I'm
> looking for a combinator "countBetween m n p" which will run the
> parser between m and n times. It does not exist in Parsec.
infixr 2 <:>
(<:>) = ap . ap (return (:))
countBetween 0 0 _ = return [
How to use parsec to match optional things.
Lets consider regex style matching of greedy a?b,
lazy a??b, and possessive a?+b.
And consider greedy a*b, lazy a*?b, and possessive a*+b.
Then I think these examples (cribbed from my module) will work:
-- Building blocks
greedyOpt p contFail con
Robert Dockins wrote:
On Aug 29, 2006, at 9:11 AM, Tomasz Zielonka wrote:
On Tue, Aug 29, 2006 at 03:05:39PM +0200, Stephane Bortzmeyer wrote:
Parsec provides "count n p" to run the parser p exactly n times. I'm
looking for a combinator "countBetween m n p" which will run the
parser between m
On Aug 29, 2006, at 9:11 AM, Tomasz Zielonka wrote:
On Tue, Aug 29, 2006 at 03:05:39PM +0200, Stephane Bortzmeyer wrote:
Parsec provides "count n p" to run the parser p exactly n times. I'm
looking for a combinator "countBetween m n p" which will run the
parser between m and n times. It does n
I put the "try" in the wrong place. Silly me
-- This also works and uses <|> directly instead of via option
countBetween' m n p | m<=n = do
xs <- count m p
let loop 0 acc = return (acc [])
loop i acc =
(do x <- try p
loop (pred i) (acc . (x:))) <|>
(return
Stephane Bortzmeyer wrote:
Parsec provides "count n p" to run the parser p exactly n times. I'm
looking for a combinator "countBetween m n p" which will run the
parser between m and n times. It does not exist in Parsec.
Much to my surprise, it seems quite difficult to write it myself and,
until
On Tue, Aug 29, 2006 at 03:11:09PM +0200,
Tomasz Zielonka <[EMAIL PROTECTED]> wrote
a message of 28 lines which said:
> How about this?
It works fine, many thanks. Here is the version rewritten according to
my taste:
import Text.ParserCombinators.Parsec
import Data.Maybe (catMaybes)
countBet
On Tue, 29 Aug 2006, Tomasz Zielonka wrote:
> How about this?
>
> countBetween m n p = do
> xs <- count m p
> ys <- count (n - m) $ option Nothing $ do
> y <- p
> return (Just y)
> return (xs ++ catMaybes ys)
>
> Assuming n >= m.
>
> > Does a
On Tue, Aug 29, 2006 at 03:05:39PM +0200, Stephane Bortzmeyer wrote:
> Parsec provides "count n p" to run the parser p exactly n times. I'm
> looking for a combinator "countBetween m n p" which will run the
> parser between m and n times. It does not exist in Parsec.
> Much to my surprise, it seem
Parsec provides "count n p" to run the parser p exactly n times. I'm
looking for a combinator "countBetween m n p" which will run the
parser between m and n times. It does not exist in Parsec.
Much to my surprise, it seems quite difficult to write it myself and,
until now, I failed (the best resul
Andrea Rossato wrote:
> Il Mon, Aug 28, 2006 at 09:28:02PM +0100, Brian Hulley ebbe a scrivere:
> > data Eval_SOI a = SOIE {runSOIE :: State -> (a, State, Output, Bool)}
>
> well, I thought that this was not possible:
> (>>=) :: m a -> (a -> m b) -> m b
And you are right. In case of an exception
Andrea Rossato wrote:
Il Tue, Aug 29, 2006 at 07:45:46AM +0100, Brian Hulley ebbe a
scrivere:
Andrea Rossato wrote:
Il Mon, Aug 28, 2006 at 09:28:02PM +0100, Brian Hulley ebbe a
scrivere:
where the 4th element of the tuple is True iff we can continue or
False iff an exception occurred.
I'm s
Il Tue, Aug 29, 2006 at 07:45:46AM +0100, Brian Hulley ebbe a scrivere:
> Andrea Rossato wrote:
> >Il Mon, Aug 28, 2006 at 09:28:02PM +0100, Brian Hulley ebbe a
> >scrivere:
> >>where the 4th element of the tuple is True iff we can continue or
> >>False iff an exception occurred.
> >
> >I'm startin
20 matches
Mail list logo