
27 Mar
2008
27 Mar
'08
8:26 p.m.
Hi Paul,
2008/3/27 Paul Keir
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 http://www.haskell.org/ghc/docs/latest/html/libraries/parsec/Text-ParserComb...): symbol :: String -> CharParser st String reserved :: String -> CharParser st () The type of a do block is the same as the type of its last statement. But (reserved "parameter") and (symbol ";") do not have the same type. Luke