I'm working on a large Haskell program, so I'm only including the code that seems relevant here to make the problem clearer. Please comment if I should include more.
When I compile, I get only one error message: "parse error (possibly incorrect indentation or mismatched brackets)"
Here is some code with no errors (printStmt) and a very similar section (VarDeclStmt) with the error directed at the line reading, "expr >>= \s ->". I don't see why one would be fine and the other would cause a problem. In what way are they different?
printStmt =
keyword "print" >>
expr >>= \e ->
symbol ";" >>
return (Print e)
varDeclStmt = do
keyword "var" >>
expr >>= \s -> --ERROR
symbol "=" >>
expr >>= \e ->
return (VarDecl s e)