summaryrefslogtreecommitdiff
path: root/compiler/utils/FastString.lhs
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-12-14 01:02:12 +0000
committerIan Lynagh <ian@well-typed.com>2012-12-14 01:02:12 +0000
commit3c171430d46c26bb733ee627d9a9a66951d22c74 (patch)
tree904c29b3d2ad8b4d078af66eff07c764f656fdb5 /compiler/utils/FastString.lhs
parentfae0d4c0f4364c80c082ed9c727b84a8ba0e18d8 (diff)
downloadhaskell-3c171430d46c26bb733ee627d9a9a66951d22c74.tar.gz
Use BS.pack instead of mkFastBytesByteList
Diffstat (limited to 'compiler/utils/FastString.lhs')
-rw-r--r--compiler/utils/FastString.lhs10
1 files changed, 0 insertions, 10 deletions
diff --git a/compiler/utils/FastString.lhs b/compiler/utils/FastString.lhs
index 0a23792050..3ef92a46a1 100644
--- a/compiler/utils/FastString.lhs
+++ b/compiler/utils/FastString.lhs
@@ -32,7 +32,6 @@ module FastString
foreignPtrToFastBytes,
fastStringToFastBytes,
fastZStringToByteString,
- mkFastBytesByteList,
unsafeMkFastBytesString,
hashFB,
@@ -145,15 +144,6 @@ fastStringToFastBytes f = fs_fb f
fastZStringToByteString :: FastZString -> ByteString
fastZStringToByteString (FastZString bs) = bs
-mkFastBytesByteList :: [Word8] -> FastBytes
-mkFastBytesByteList bs =
- inlinePerformIO $ do
- let l = Prelude.length bs
- buf <- mallocForeignPtrBytes l
- withForeignPtr buf $ \ptr -> do
- pokeArray (castPtr ptr) bs
- return $ foreignPtrToFastBytes buf l
-
-- This will drop information if any character > '\xFF'
unsafeMkFastBytesString :: String -> FastBytes
unsafeMkFastBytesString str =