[Haskell] Parsec operator issue

Erik de Castro Lopo mle+hs at mega-nerd.com
Tue Feb 16 17:50:50 EST 2010


Adam Crume wrote:

> 
> I have a parser with a prefix "-" and an infix "=".  When I try to 
>  parse "x=-1", it fails.  Does anyone know how to fix this? 
>  I stripped my code down as much as possible.  It parses "x=1" and 
>  "-1", but fails for "x=-1". 

I ran into simialr problems some time ago and blogged about it
here:

   http://www.mega-nerd.com/erikd/Blog/CodeHacking/Haskell/parsec_expression_parsing.html

Not sure if your problem is exactly the same, but my solution might
point you in the right direction.

BTW, the haskell-cafe mailing list may be a better place for questions
like this. It seems to have a larger readership and is more discussion
focused while this list is more for announcements.

Cheers,
Erik

-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


More information about the Haskell mailing list