@@ -10,7 +10,7 @@ import Happy.Tabular.Info
10
10
import Happy.Tabular.Tabular
11
11
import Data.Array (Array )
12
12
import System.IO
13
- import System.Exit
13
+ import System.Exit ( exitWith , ExitCode ( .. ))
14
14
import Control.Monad
15
15
16
16
-------- Main entry point (runTabular) --------
@@ -67,11 +67,11 @@ reportConflicts :: Grammar -> Int -> Int -> IO ()
67
67
reportConflicts g sr rr = case expect g of
68
68
Just n | n == sr && rr == 0 -> return ()
69
69
Just _ | rr > 0 ->
70
- die' $ " The grammar has reduce/reduce conflicts.\n " ++
71
- " This is not allowed when an expect directive is given\n "
70
+ die $ " The grammar has reduce/reduce conflicts.\n " ++
71
+ " This is not allowed when an expect directive is given\n "
72
72
Just _ ->
73
- die' $ " The grammar has " ++ show sr ++ " shift/reduce conflicts.\n " ++
74
- " This is different from the number given in the expect directive\n "
73
+ die $ " The grammar has " ++ show sr ++ " shift/reduce conflicts.\n " ++
74
+ " This is different from the number given in the expect directive\n "
75
75
_ -> do
76
76
if sr /= 0
77
77
then hPutStrLn stderr (" shift/reduce conflicts: " ++ show sr)
@@ -81,8 +81,8 @@ reportConflicts g sr rr = case expect g of
81
81
then hPutStrLn stderr (" reduce/reduce conflicts: " ++ show rr)
82
82
else return ()
83
83
84
- die' :: String -> IO a
85
- die' s = hPutStr stderr s >> exitWith (ExitFailure 1 )
84
+ die :: String -> IO a
85
+ die s = hPutStr stderr s >> exitWith (ExitFailure 1 )
86
86
87
87
writeInfoFile
88
88
:: [LALR. ItemSetWithGotos ]
0 commit comments