@@ -57,13 +57,16 @@ lexWS = do i <- getInput
5757 where
5858
5959 simpleSpace = skipMany1 (satisfy isSpace)
60− oneLineComment = do try (do string ("--")
61− satisfy (\x -> x /= '|' && x /= '^'))
62− skipMany (satisfy (/= '\n'))
63− return ()
64− multiLineComment = do try (do string "{-"
65− satisfy (\x -> x /= '|' && x /= '^'))
66− inCommentMulti
60+ oneLineComment =
61+ try (void $ string "--\n") <|>
62+ do try (do string "--"
63+ satisfy (\x -> x /= '|' && x /= '^'))
64+ skipMany (satisfy (/= '\n'))
65+ multiLineComment =
66+ try (void $ string "{--}") <|>
67+ do try (do string "{-"
68+ satisfy (\x -> x /= '|' && x /= '^'))
69+ inCommentMulti
6770
6871 inCommentMulti
6972 = do{ try (string "-}") ; return () }