Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/ca56668af97f534b3cff8717fc35d795a0bcb47d >--------------------------------------------------------------- commit ca56668af97f534b3cff8717fc35d795a0bcb47d Author: Ian Lynagh <i...@well-typed.com> 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) _______________________________________________ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.org/mailman/listinfo/cvs-ghc