Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
ca56668a
Commit
ca56668a
authored
Dec 14, 2012
by
ian@well-typed.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the trivial mkFastStringFastBytes wrapper
parent
a243fa79
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
7 deletions
+4
-7
compiler/deSugar/MatchLit.lhs
compiler/deSugar/MatchLit.lhs
+1
-1
compiler/utils/Binary.hs
compiler/utils/Binary.hs
+1
-1
compiler/utils/FastString.lhs
compiler/utils/FastString.lhs
+2
-5
No files found.
compiler/deSugar/MatchLit.lhs
View file @
ca56668a
...
...
@@ -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 $ mkFastString
FastBytes
s
s' <- liftIO $ mkFastString
ByteString
s
; lit <- mkStringExprFS s'
; let pred = mkApps (Var eq_str) [Var var, lit]
; return (mkGuardedMatchResult pred mr) }
...
...
compiler/utils/Binary.hs
View file @
ca56668a
...
...
@@ -720,7 +720,7 @@ putFS bh fs = putBS bh $ fastStringToFastBytes fs
getFS
::
BinHandle
->
IO
FastString
getFS
bh
=
do
bs
<-
getBS
bh
mkFastString
FastBytes
bs
mkFastString
ByteString
bs
putBS
::
BinHandle
->
ByteString
->
IO
()
putBS
bh
bs
=
...
...
compiler/utils/FastString.lhs
View file @
ca56668a
...
...
@@ -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
$ mkFastString
FastBytes
$ mkFastString
ByteString
$ BS.append (fastStringToFastBytes fs1)
(fastStringToFastBytes fs2)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment