Commit 64da671a authored by alexbiehl's avatar alexbiehl Committed by Ben Gamari
Browse files

Binary: Only allocate un-interned FastStrings

Test Plan: Validate

Reviewers: austin, bgamari

Reviewed By: bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D3109
parent 07292e95
...@@ -724,8 +724,9 @@ putFS :: BinHandle -> FastString -> IO () ...@@ -724,8 +724,9 @@ putFS :: BinHandle -> FastString -> IO ()
putFS bh fs = putBS bh $ fastStringToByteString fs putFS bh fs = putBS bh $ fastStringToByteString fs
getFS :: BinHandle -> IO FastString getFS :: BinHandle -> IO FastString
getFS bh = do bs <- getBS bh getFS bh = do
return $! mkFastStringByteString bs l <- get bh :: IO Int
getPrim bh l (\src -> pure $! mkFastStringBytes src l )
putBS :: BinHandle -> ByteString -> IO () putBS :: BinHandle -> ByteString -> IO ()
putBS bh bs = putBS bh bs =
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment