diff options
author | Vladislav Zavialov <vlad.z.4096@gmail.com> | 2019-02-16 03:38:21 +0300 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-02-17 20:04:33 -0500 |
commit | 1ffee940a011fc75f40514696a747dd1f3d4f342 (patch) | |
tree | 967a656c0aa5aeadc584bb457e7e5cb7c9b4e007 /compiler/main/InteractiveEval.hs | |
parent | 1f1b9e356a873ec7da84cdac2a7850ecb2b32ea9 (diff) | |
download | haskell-1ffee940a011fc75f40514696a747dd1f3d4f342.tar.gz |
Fix warnings and fatal parsing 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 |