summaryrefslogtreecommitdiff
path: root/utils/genprimopcode
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2015-07-03 01:19:59 +0200
committerThomas Miedema <thomasmiedema@gmail.com>2015-07-04 10:36:54 +0200
commit69beef56a4c020d08e1b0243d4c1a629f972e019 (patch)
tree73b92a2a3f0821c7dd26ba4678d964de4aaf95ce /utils/genprimopcode
parent889c81c657b5719a8f4091099b7bf186127e9f53 (diff)
downloadhaskell-69beef56a4c020d08e1b0243d4c1a629f972e019.tar.gz
Replace usages of `-w` by `-fno-warn`s
And remove unused imports and language pragmas. I checked that the minimum Happy and Alex version requirements, as listed in aclocal.m4, don't have to change. Before building ghc, I ran: - cabal install happy==1.19.4 --with-ghc=ghc-7.8.4 - cabal install alex==3.1.0 --with-ghc=ghc-7.6.3 Differential Revision: https://phabricator.haskell.org/D1032
Diffstat (limited to 'utils/genprimopcode')
-rw-r--r--utils/genprimopcode/Lexer.x18
-rw-r--r--utils/genprimopcode/Parser.y8
2 files changed, 11 insertions, 15 deletions
diff --git a/utils/genprimopcode/Lexer.x b/utils/genprimopcode/Lexer.x
index 4887f46cca..3ec6c2ef6e 100644
--- a/utils/genprimopcode/Lexer.x
+++ b/utils/genprimopcode/Lexer.x
@@ -1,8 +1,11 @@
{
-{-# LANGUAGE BangPatterns #-} -- required for versions of Alex before 2.3.4
-{-# OPTIONS -w -Wwarn #-}
--- The above warning suppression flag is a temporary kludge.
+{-# OPTIONS_GHC -fno-warn-unused-matches #-}
+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
+{-# OPTIONS_GHC -fno-warn-tabs #-}
+{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+-- 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
-- http://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
@@ -10,11 +13,12 @@
module Lexer (lex_tok) where
-import ParserM (ParserM (..), mkT, mkTv, Token(..), St, start_code,
+import ParserM (ParserM (..), mkT, mkTv, Token(..), start_code,
set_start_code,
inc_brace_depth, dec_brace_depth,
- show_pos, position, input,
- AlexInput, alexGetChar, alexGetByte, alexInputPrevChar)
+ show_pos, position,
+ AlexInput, alexGetByte)
+import qualified ParserM as ParserM (input)
}
words :-
@@ -81,7 +85,7 @@ get_tok = ParserM $ \i st ->
AlexError _ -> Left ("Lexical error at " ++ show_pos (position i))
AlexSkip i' _ -> case get_tok of
ParserM f -> f i' st
- AlexToken i' l a -> case a $ take l $ input i of
+ AlexToken i' l a -> case a $ take l $ ParserM.input i of
ParserM f -> f i' st
lex_tok :: (Token -> ParserM a) -> ParserM a
diff --git a/utils/genprimopcode/Parser.y b/utils/genprimopcode/Parser.y
index c70ff1ae89..6a3c0d0043 100644
--- a/utils/genprimopcode/Parser.y
+++ b/utils/genprimopcode/Parser.y
@@ -1,12 +1,4 @@
{
-{-# LANGUAGE BangPatterns #-} -- required for versions of Happy before 1.18.6
-{-# OPTIONS -w -Wwarn #-}
--- The above warning suppression flag is a temporary kludge.
--- While working on this module you are encouraged to remove it and fix
--- any warnings in the module. See
--- http://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
--- for details
-
module Parser (parse) where
import Lexer (lex_tok)