summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2015-07-06 11:13:05 +0200
committerAlan Zimmerman <alan.zimm@gmail.com>2015-07-06 11:21:54 +0200
commit2765fcf6b8846be42d014ef4e29ad6c3aa87b79d (patch)
treeda45f60af1712a077b1d484520ad2ba694340100
parent4681f55970cabc6e33591d7e698621580818f9a2 (diff)
downloadhaskell-wip/lexer-warnings.tar.gz
Remove warnings for -fwarn-incomplete-patternswip/lexer-warnings
And remove one unused bind. See https://phabricator.haskell.org/rGHCc0ad5bc03e02ce0d7d545599e4b1a68a6f727f2b for concerns raised prompting this change.
-rw-r--r--compiler/parser/Lexer.x6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x
index a73487b1b4..98d167d4dd 100644
--- a/compiler/parser/Lexer.x
+++ b/compiler/parser/Lexer.x
@@ -49,7 +49,6 @@
{-# OPTIONS_GHC -fno-warn-tabs #-}
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
{-# OPTIONS_GHC -fno-warn-overlapping-patterns #-}
-{-# OPTIONS_GHC -fno-warn-incomplete-patterns #-}
-- The above warning suppression flags are a temporary kludge.
-- While working on this module you are encouraged to remove it and fix
-- any warnings in the module. See
@@ -1358,12 +1357,12 @@ lex_string_prag mkTok span _buf _len
lex_string_tok :: Action
lex_string_tok span buf _len = do
tok <- lex_string ""
- end <- getSrcLoc
(AI end bufEnd) <- getInput
let
tok' = case tok of
ITprimstring _ bs -> ITprimstring src bs
ITstring _ s -> ITstring src s
+ _ -> panic "lex_string_tok"
src = lexemeToString buf (cur bufEnd - cur buf)
return (L (mkRealSrcSpan (realSrcSpanStart span) end) tok')
@@ -2321,7 +2320,7 @@ alternativeLayoutRuleToken t
setNextToken t
lexTokenAlr
-}
- (_, ALRLayout _ col : ls, Just expectingOCurly)
+ (_, ALRLayout _ col : _ls, Just expectingOCurly)
| (thisCol > col) ||
(thisCol == col &&
isNonDecreasingIntentation expectingOCurly) ->
@@ -2679,6 +2678,7 @@ commentToAnnotation (L l (ITdocOptions s)) = L l (AnnDocOptions s)
commentToAnnotation (L l (ITdocOptionsOld s)) = L l (AnnDocOptionsOld s)
commentToAnnotation (L l (ITlineComment s)) = L l (AnnLineComment s)
commentToAnnotation (L l (ITblockComment s)) = L l (AnnBlockComment s)
+commentToAnnotation _ = panic "commentToAnnotation"
-- ---------------------------------------------------------------------