Added hint to suggest missing ;; in case
This commit is contained in:
parent
fbd85e93ee
commit
a793e09bab
|
@ -34,7 +34,7 @@ import System.IO
|
||||||
import Text.Parsec.Error
|
import Text.Parsec.Error
|
||||||
import GHC.Exts (sortWith)
|
import GHC.Exts (sortWith)
|
||||||
|
|
||||||
|
lastError = 1074
|
||||||
|
|
||||||
backslash = char '\\'
|
backslash = char '\\'
|
||||||
linefeed = (optional carriageReturn) >> char '\n'
|
linefeed = (optional carriageReturn) >> char '\n'
|
||||||
|
@ -1464,7 +1464,11 @@ readCaseItem = called "case item" $ do
|
||||||
g_Rparen
|
g_Rparen
|
||||||
readLineBreak
|
readLineBreak
|
||||||
list <- ((lookAhead g_DSEMI >> return []) <|> readCompoundList)
|
list <- ((lookAhead g_DSEMI >> return []) <|> readCompoundList)
|
||||||
(g_DSEMI <|> lookAhead (readLineBreak >> g_Esac))
|
(g_DSEMI <|> lookAhead (readLineBreak >> g_Esac)) `attempting` do
|
||||||
|
pos <- getPosition
|
||||||
|
lookAhead g_Rparen
|
||||||
|
parseProblemAt pos ErrorC 1074
|
||||||
|
"Did you forget the ;; after the previous case item?"
|
||||||
readLineBreak
|
readLineBreak
|
||||||
return (pattern, list)
|
return (pattern, list)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue