Re: [Haskell-cafe] Parsec Expected Type

2008-03-27 Thread Luke Palmer
Hi Paul, 2008/3/27 Paul Keir <[EMAIL PROTECTED]>: > Hi, > > Does anyone know why this reduced Parsec production stops compilation, and > how I can fix it? > > tester = reserved "parameter" > <|> do { reserved "dimension"; symbol ":" } Look at the types of "reserved" and "symbol" (from htt

RE: [Haskell-cafe] Parsec Expected Type

2008-03-28 Thread Paul Keir
wrong? Surely the above example isn't so odd? Paul -Original Message- From: Luke Palmer [mailto:[EMAIL PROTECTED] Sent: Fri 3/28/2008 12:26 AM To: Paul Keir Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] Parsec Expected Type Hi Paul, 2008/3/27 Paul Keir <[EMAIL

Re: [Haskell-cafe] Parsec Expected Type

2008-03-28 Thread Jonathan Cast
On 28 Mar 2008, at 2:02 AM, Paul Keir wrote: Thanks, I'd thought it was something to do with incompatible types. I can now create a simpler problem: tester2 = reserved "parameter" <|> symbol ":" Certainly I could use reserved ":" instead of symbol, but where is my thinking with symbol here

RE: [Haskell-cafe] Parsec Expected Type

2008-03-28 Thread Paul Keir
;; return () } but that's feels a bit contrived; or I could use 'reserved' twice. Perhaps I'd express my confusion better if I ask: Why are 'reserved' and 'symbol' different types? Paul (Haskell Novice) -Original Message----- From: Jonathan Cas

Re: [Haskell-cafe] Parsec Expected Type

2008-03-28 Thread Ryan Ingram
On 3/28/08, Paul Keir <[EMAIL PROTECTED]> wrote: > What I'd like is to parse either the string "parameter", or the string ":". > I'm using 'reserved' and 'symbol' because they seem to correspond well to > the concepts in the language I'm parsing. I could try, > > tester3 = reserved "parameter" <|>

Re: [Haskell-cafe] Parsec Expected Type

2008-03-28 Thread Brandon S. Allbery KF8NH
On Mar 28, 2008, at 21:12 , Ryan Ingram wrote: On 3/28/08, Paul Keir <[EMAIL PROTECTED]> wrote: What I'd like is to parse either the string "parameter", or the string ":". I'm using 'reserved' and 'symbol' because they seem to correspond well to the concepts in the language I'm parsing. I c

RE: [Haskell-cafe] Parsec Expected Type

2008-03-29 Thread Paul Keir
Many thanks guys, you've really taught me how to catch a fish here! Paul -Original Message- From: Brandon S. Allbery KF8NH [mailto:[EMAIL PROTECTED] Sent: Sat 3/29/2008 1:41 AM To: haskell-cafe@haskell.org Cafe Cc: Paul Keir Subject: Re: [Haskell-cafe] Parsec Expected Type On M

Re: [Haskell-cafe] Parsec Expected Type

2008-03-30 Thread Tillmann Rendel
Paul Keir wrote: > What I'd like is to parse either the string "parameter", or the > string ":". I'm using 'reserved' and 'symbol' because they seem to > correspond well to the concepts in the language I'm parsing. You may consider using reservedOp for ":", depending on how ":+" should be par

RE: [Haskell-cafe] Parsec Expected Type

2008-04-07 Thread Paul Keir
o: Paul Keir; haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] Parsec Expected Type Paul Keir wrote: > What I'd like is to parse either the string "parameter", or the > string ":". I'm using 'reserved' and 'symbol' because they seem to >