[commit: ghc] master: Revert "ghc-cabal: Inline removed function ..." (2e16a57)

git at git.haskell.org git at git.haskell.org
Wed Oct 25 08:59:58 UTC 2017


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

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

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

commit 2e16a578e9380ea88792d0f9825b68faf4b81b8f
Author: Tamar Christina <tamar at zhox.com>
Date:   Wed Oct 25 09:53:25 2017 +0100

    Revert "ghc-cabal: Inline removed function ..."
    
    This reverts commit f744261ad25942e8a747821fc468f1a21c9c705c.


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

2e16a578e9380ea88792d0f9825b68faf4b81b8f
 utils/ghc-cabal/Main.hs | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/utils/ghc-cabal/Main.hs b/utils/ghc-cabal/Main.hs
index 4ad1187..e445520 100644
--- a/utils/ghc-cabal/Main.hs
+++ b/utils/ghc-cabal/Main.hs
@@ -15,10 +15,9 @@ import Distribution.Simple.GHC
 import Distribution.Simple.Program
 import Distribution.Simple.Program.HcPkg
 import Distribution.Simple.Setup (ConfigFlags(configStripLibs), fromFlag, toFlag)
-import Distribution.Simple.Utils (defaultPackageDesc, writeFileAtomic)
+import Distribution.Simple.Utils (defaultPackageDesc, writeFileAtomic, toUTF8)
 import Distribution.Simple.Build (writeAutogenFiles)
 import Distribution.Simple.Register
-import Distribution.Utils.String (encodeStringUtf8)
 import Distribution.Text
 import Distribution.Types.MungedPackageId
 import Distribution.Verbosity
@@ -28,7 +27,6 @@ import qualified Distribution.Simple.PackageIndex as PackageIndex
 import Control.Exception (bracket)
 import Control.Monad
 import qualified Data.ByteString.Lazy.Char8 as BS
-import Data.Char (chr)
 import Data.List
 import Data.Maybe
 import System.IO
@@ -458,8 +456,3 @@ generate directory distdir config_args
      writeFileUtf8 f txt = withFile f WriteMode $ \hdl -> do
          hSetEncoding hdl utf8
          hPutStr hdl txt
-
--- | Was removed from Cabal so inline the old definition since
---   there isn't a 1-1 replacement for this.
-toUTF8 :: String -> String
-toUTF8 = map (chr . fromIntegral) . encodeStringUtf8



More information about the ghc-commits mailing list