[commit: ghc] master: Remove the trivial mkFastStringFastBytes wrapper (ca56668)

Ian Lynagh <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/ca56668af97f534b3cff8717fc35d795a0bcb47d

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

commit ca56668af97f534b3cff8717fc35d795a0bcb47d
Author: Ian Lynagh <[email protected]>
Date:   Fri Dec 14 18:14:51 2012 +0000

    Remove the trivial mkFastStringFastBytes wrapper

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

 compiler/deSugar/MatchLit.lhs |    2 +-
 compiler/utils/Binary.hs      |    2 +-
 compiler/utils/FastString.lhs |    7 ++-----
 3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/compiler/deSugar/MatchLit.lhs b/compiler/deSugar/MatchLit.lhs
index f6207f1..03ddc22 100644
--- a/compiler/deSugar/MatchLit.lhs
+++ b/compiler/deSugar/MatchLit.lhs
@@ -263,7 +263,7 @@ matchLiterals (var:vars) ty sub_groups
     wrap_str_guard eq_str (MachStr s, mr)
 	= do { -- We now have to convert back to FastString. Perhaps there
 	       -- should be separate MachBytes and MachStr constructors?
-	       s'     <- liftIO $ mkFastStringFastBytes s
+	       s'     <- liftIO $ mkFastStringByteString s
 	     ; lit    <- mkStringExprFS s'
 	     ; let pred = mkApps (Var eq_str) [Var var, lit]
 	     ; return (mkGuardedMatchResult pred mr) }
diff --git a/compiler/utils/Binary.hs b/compiler/utils/Binary.hs
index 77f29a0..e90addd 100644
--- a/compiler/utils/Binary.hs
+++ b/compiler/utils/Binary.hs
@@ -720,7 +720,7 @@ putFS bh fs = putBS bh $ fastStringToFastBytes fs
 
 getFS :: BinHandle -> IO FastString
 getFS bh = do bs <- getBS bh
-              mkFastStringFastBytes bs
+              mkFastStringByteString bs
 
 putBS :: BinHandle -> ByteString -> IO ()
 putBS bh bs =
diff --git a/compiler/utils/FastString.lhs b/compiler/utils/FastString.lhs
index 228b053..67327d5 100644
--- a/compiler/utils/FastString.lhs
+++ b/compiler/utils/FastString.lhs
@@ -28,8 +28,8 @@ module FastString
        (
         -- * FastBytes
         FastBytes,
-        mkFastStringFastBytes,
         fastStringToFastBytes,
+        mkFastStringByteString,
         fastZStringToByteString,
         unsafeMkFastBytesString,
         hashByteString,
@@ -131,9 +131,6 @@ import GHC.Base         ( unpackCString# )
 
 type FastBytes = ByteString
 
-mkFastStringFastBytes :: FastBytes -> IO FastString
-mkFastStringFastBytes bs = mkFastStringByteString bs
-
 fastStringToFastBytes :: FastString -> FastBytes
 fastStringToFastBytes f = fs_fb f
 
@@ -449,7 +446,7 @@ zEncodeFS fs@(FastString _ _ _ ref) =
 
 appendFS :: FastString -> FastString -> FastString
 appendFS fs1 fs2 = inlinePerformIO
-                 $ mkFastStringFastBytes
+                 $ mkFastStringByteString
                  $ BS.append (fastStringToFastBytes fs1)
                              (fastStringToFastBytes fs2)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.