Re: [Haskell-cafe] Newbie: a parser for a list of objects?

2007-03-29 Thread Dmitri O.Kondratiev
Daniel, New combinator (:) that you introduced helps a lot to understand the whole thing. I think that your explanation should be included in the next edition of the Haskell. The Craft of Functional Programming, I really mean it. To summarize how I now understand the parser: Using your

Re: [Haskell-cafe] Newbie: a parser for a list of objects?

2007-03-28 Thread Dmitri O.Kondratiev
Daniel, I am still trying to figure out the order of function applications in the parser returning list of objects (I attached again the code to the end of this message for convenience). You wrote: (*) associates to the right, hence p * (p * (p * (... * (p * succeed [])...))) I don't understand

Re: [Haskell-cafe] Newbie: a parser for a list of objects?

2007-03-28 Thread Daniel Fischer
Am Mittwoch, 28. März 2007 11:57 schrieb Dmitri O.Kondratiev: Daniel, I am still trying to figure out the order of function applications in the parser returning list of objects (I attached again the code to the end of this message for convenience). You wrote: (*) associates to the right,

Re: [Haskell-cafe] Newbie: a parser for a list of objects?

2007-03-27 Thread Dmitri O.Kondratiev
Thanks Daniel! Things are getting more in shape, yet I still can not fully comprehend the expression: ((p * pList p) `build` (uncurry (:))) where (*) :: Parse a b - Parse a c - Parse a (b, c) (*) p1 p2 inp = [((x,y), rem2) |(x, rem1) - p1 inp, (y, rem2) - p2 rem1] build :: Parse a b - (b - c)

Re: [Haskell-cafe] Newbie: a parser for a list of objects?

2007-03-27 Thread Daniel Fischer
Am Dienstag, 27. März 2007 12:15 schrieb Dmitri O.Kondratiev: Thanks Daniel! Things are getting more in shape, yet I still can not fully comprehend the expression: ((p * pList p) `build` (uncurry (:))) where (*) :: Parse a b - Parse a c - Parse a (b, c) (*) p1 p2 inp = [((x,y), rem2)

Re: [Haskell-cafe] Newbie: a parser for a list of objects?

2007-03-26 Thread Daniel Fischer
-Ursprüngliche Nachricht- Von: Dmitri O.Kondratiev [EMAIL PROTECTED] Gesendet: 26.03.07 16:44:12 An: haskell-cafe@haskell.org Betreff: [Haskell-cafe] Newbie: a parser for a list of objects? Please see my questions inside comments {-- --} : Thanks! --- module Parser where