[commit: ghc] master: Harden imports in `DeriveConstants.hs` module (a15d243)

git at git.haskell.org git at git.haskell.org
Tue May 20 07:44:33 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/a15d243e4c15c45a401dec8c30a5135b6b006115/ghc

>---------------------------------------------------------------

commit a15d243e4c15c45a401dec8c30a5135b6b006115
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Tue May 20 09:40:36 2014 +0200

    Harden imports in `DeriveConstants.hs` module
    
    This was generated by applying `-ddump-minimal-imports` and addresses
    the current compile failure (see #9016) with GHC HEAD due to the new
    `die` being exported by `System.Exit`
    
    Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org>


>---------------------------------------------------------------

a15d243e4c15c45a401dec8c30a5135b6b006115
 utils/deriveConstants/DeriveConstants.hs | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/utils/deriveConstants/DeriveConstants.hs b/utils/deriveConstants/DeriveConstants.hs
index 6bfce24..d15f619 100644
--- a/utils/deriveConstants/DeriveConstants.hs
+++ b/utils/deriveConstants/DeriveConstants.hs
@@ -10,20 +10,20 @@ into non-C source containing this information.
 
 ------------------------------------------------------------------------ -}
 
-import Control.Monad
-import Data.Bits
-import Data.Char
-import Data.List
+import Control.Monad (when, unless)
+import Data.Bits (shiftL)
+import Data.Char (toLower)
+import Data.List (stripPrefix)
 import Data.Map (Map)
 import qualified Data.Map as Map
-import Data.Maybe
-import Numeric
-import System.Environment
-import System.Exit
-import System.FilePath
-import System.IO
-import System.Info
-import System.Process
+import Data.Maybe (catMaybes)
+import Numeric (readHex)
+import System.Environment (getArgs)
+import System.Exit (ExitCode(ExitSuccess), exitFailure)
+import System.FilePath ((</>))
+import System.IO (stderr, hPutStrLn)
+import System.Info (os)
+import System.Process (showCommandForUser, readProcess, rawSystem)
 
 main :: IO ()
 main = do opts <- parseArgs



More information about the ghc-commits mailing list