diff options
author | Vladislav Zavialov <vlad.z.4096@gmail.com> | 2019-02-16 03:38:21 +0300 |
---|---|---|
committer | Vladislav Zavialov <vlad.z.4096@gmail.com> | 2019-02-16 13:32:03 +0300 |
commit | 60eb2fba1d31ca3bb1dea34c019c42db5340cb44 (patch) | |
tree | eaf29330ee272a90b7f2ed9a8eb4dbf1284e9a17 /compiler/main/InteractiveEval.hs | |
parent | 5544f6082d6e15d305b83f27f4daa29576d3666e (diff) | |
download | haskell-wip/parse-errors.tar.gz |
Fix warnings and fatal parsing errorswip/parse-errors
Diffstat (limited to 'compiler/main/InteractiveEval.hs')
-rw-r--r-- | compiler/main/InteractiveEval.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/main/InteractiveEval.hs b/compiler/main/InteractiveEval.hs index 4e6d26b1d6..5ff1b03a97 100644 --- a/compiler/main/InteractiveEval.hs +++ b/compiler/main/InteractiveEval.hs @@ -816,14 +816,14 @@ isStmt :: DynFlags -> String -> Bool isStmt dflags stmt = case parseThing Parser.parseStmt dflags stmt of Lexer.POk _ _ -> True - Lexer.PFailed _ _ _ -> False + Lexer.PFailed _ -> False -- | Returns @True@ if passed string has an import declaration. hasImport :: DynFlags -> String -> Bool hasImport dflags stmt = case parseThing Parser.parseModule dflags stmt of Lexer.POk _ thing -> hasImports thing - Lexer.PFailed _ _ _ -> False + Lexer.PFailed _ -> False where hasImports = not . null . hsmodImports . unLoc @@ -832,7 +832,7 @@ isImport :: DynFlags -> String -> Bool isImport dflags stmt = case parseThing Parser.parseImport dflags stmt of Lexer.POk _ _ -> True - Lexer.PFailed _ _ _ -> False + Lexer.PFailed _ -> False -- | Returns @True@ if passed string is a declaration but __/not a splice/__. isDecl :: DynFlags -> String -> Bool @@ -842,7 +842,7 @@ isDecl dflags stmt = do case unLoc thing of SpliceD _ _ -> False _ -> True - Lexer.PFailed _ _ _ -> False + Lexer.PFailed _ -> False parseThing :: Lexer.P thing -> DynFlags -> String -> Lexer.ParseResult thing parseThing parser dflags stmt = do |