[commit: ghc] master: Use -fno-warn-unused-imports instead of hiding `ord` (c875b08)

git at git.haskell.org git at git.haskell.org
Sat Jul 4 22:43:55 UTC 2015


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

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

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

commit c875b085d95377771a5b3cf0f44bb2910dbfe966
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Sat Jul 4 18:20:06 2015 +0200

    Use -fno-warn-unused-imports instead of hiding `ord`
    
    This is more future proof. Maybe later versions of Alex won't `import
    Data.Char (ord)` anymore.


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

c875b085d95377771a5b3cf0f44bb2910dbfe966
 compiler/cmm/CmmLex.x   | 3 ++-
 compiler/parser/Lexer.x | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/compiler/cmm/CmmLex.x b/compiler/cmm/CmmLex.x
index cb71c7d..fca5a1e 100644
--- a/compiler/cmm/CmmLex.x
+++ b/compiler/cmm/CmmLex.x
@@ -13,6 +13,7 @@
 {
 {-# OPTIONS_GHC -fno-warn-unused-matches #-}
 {-# OPTIONS_GHC -fno-warn-unused-binds #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
 {-# OPTIONS_GHC -fno-warn-tabs #-}
 {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
 -- The above warning suppression flags are a temporary kludge.
@@ -37,7 +38,7 @@ import Util
 --import TRACE
 
 import Data.Word
-import Data.Char hiding (ord)
+import Data.Char
 }
 
 $whitechar   = [\ \t\n\r\f\v\xa0] -- \xa0 is Unicode no-break space
diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x
index 8e6e67d..df7347e 100644
--- a/compiler/parser/Lexer.x
+++ b/compiler/parser/Lexer.x
@@ -45,6 +45,7 @@
 {-# LANGUAGE BangPatterns #-}
 {-# OPTIONS_GHC -fno-warn-unused-matches #-}
 {-# OPTIONS_GHC -fno-warn-unused-binds #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
 {-# OPTIONS_GHC -fno-warn-tabs #-}
 {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
 {-# OPTIONS_GHC -fno-warn-overlapping-patterns #-}
@@ -84,7 +85,7 @@ import Control.Applicative
 #endif
 import Control.Monad
 import Data.Bits
-import Data.Char hiding (ord)
+import Data.Char
 import Data.List
 import Data.Maybe
 import Data.Word



More information about the ghc-commits mailing list