[Haskell-cafe] Still no joy with parsec

Daniel Fischer daniel.is.fischer at web.de
Tue May 6 13:46:21 EDT 2008


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.



More information about the Haskell-Cafe mailing list