summaryrefslogtreecommitdiff
path: root/utils/genprimopcode
diff options
context:
space:
mode:
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)