[Haskell-cafe] Still no joy with parsec

Ross Boylan RossBoylan at stanfordalumni.org
Tue May 6 13:52:00 EDT 2008


On Tue, 2008-05-06 at 19:46 +0200, Daniel Fischer wrote:
> Am Dienstag, 6. Mai 2008 18:52 schrieb Ross Boylan:
> >
> > Source:
> > import Text.ParserCombinators.Parsec
> > import qualified Text.ParserCombinators.Parsec.Token as P
> > import Text.ParserCombinators.Parsec.Language(haskell)
> > reserved = P.reserved haskell
> > braces = P.braces haskell
> >
> >
> > -- TeX example
> >
> > envBegin :: Parser String
> > envBegin     = do{ reserved "\\begin"
> > 1                 ; braces (many1 letter)
> ^^^^^
> >                  }
> 
> Right there appears the '1' that irritated you. Remove it from the source 
> file, and ghc is happy.
Ouch!  I can't believe I missed that.  Thank you.

I'm still interested in some of the more general questions I had, if
anyone on the list can help.

Ross


More information about the Haskell-Cafe mailing list